I'm trying to achieve a grid layout to match this wireframe:
So far I've got the following markup:
<div class="grid">
<div class="spanWidth">
<img src="https://loremflickr.com/290/130?random=1" />
</div>
<div>
<img src="https://loremflickr.com/140/130?random=2" />
</div>
<div>
<img src="https://loremflickr.com/140/180?random=3" />
</div>
<div>
<img src="https://loremflickr.com/140/130?random=4" />
</div>
<div>
<img src="https://loremflickr.com/140/130?random=5" />
</div>
<div>
<img src="https://loremflickr.com/140/180?random=6" />
</div>
<div>
<img src="https://loremflickr.com/140/130?random=7" />
</div>
</div>
with CSS:
.grid {
display: grid;
grid-gap: 10px;
}
.spanWidth {
grid-column: 1 / span 2;
}
The problem I'm running into is that the irregularly-sized images don't conform to a 'row' layout. They take up 1.25 rows. Which means I end up with gaps in the grid:
Is there anything I can do here to match the wireframe?