<div class="grid">
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
</div>
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
grid-auto-rows: 240px;
gap: 20px;
width: 90%;
margin: 0 auto;
max-width: 680px;
}
.card:first-child {
grid-column-start: 1;
grid-column-end: -1;
}
.card {
border-radius: 12px;
background-color: #0180AE;
}
body {
margin: 2rem 0;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.