<div class="container">
<div class="item item--1">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item">4</div>
<div class="item">5</div>
<div class="item">6</div>
</div>
/* -------- Skip this base code -------- */
* { box-sizing: border-box; } .container { display: grid; gap: 1px; padding: 1px; border: 16px solid silver; color: white; } .item { padding: 8px; background: coral; } .item--1 { background: royalblue; }
.container {
grid:
[Y]
'. . .'
[Y]
'. . .'
[Y]
'. . .'
[Y]
/
[X] 1fr [X] 1fr [X] 1fr [X];
}
.item--1 {
grid-area: Y / X / 3 Y / -2 X;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.