<div class="container">
<div class="item item--1">1 (160*80px)</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 class="item">7</div>
<div class="item">8</div>
</div>
<br>
/* -------- Skip this base code -------- */
* { box-sizing: border-box; } .container { display: grid; gap: 1px; padding: 1px; border: 16px solid silver; } .item { padding: 8px; color: white; background: coral; } .item--1 { background: royalblue; }
.container {
grid-template: 80px / 160px 1fr auto; /* ⬅️ */
/* grid: 80px / 160px 1fr auto; */
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.