I am trying to create the following layout with css grid:
What I have tried so far looks as follows:
.grid {
padding: 16px;
display: grid;
grid-template-rows: repeat(auto-fill, 200px);
}
img {
height: 100%;
width: auto;
}
but I am having trouble making the column count dynamic. Is it not possible at all?

grid-template-columns:repeat(auto-fill,150px);the max width for the columns will be 150px, you might see some overlaps, if so you needmax-width:100%