Items that span columns
Make some items bigger than others.
CSS · Items that span columnsIntermediate
.gallery {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-auto-rows: 140px;
grid-auto-flow: dense;
gap: 10px;
}
.gallery .wide { grid-column: span 2; }
.gallery .tall { grid-row: span 2; }
.gallery .big { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }gridspanfeaturedmasonry-like