1.Mobile-first columns
IntermediateWrite mobile-first CSS so the three boxes stack in one column by default, and sit in three equal columns when the viewport is at least 500px wide.
<div class="cols">
<div>One</div>
<div>Two</div>
<div>Three</div>
</div>Show hint
Base styles with display: grid and a gap; add grid-template-columns inside @media (min-width: 500px).
Show solution
.cols {
display: grid;
gap: 10px;
}
.cols > div {
padding: 16px;
background: #eef3ff;
}
@media (min-width: 500px) {
.cols {
grid-template-columns: repeat(3, 1fr);
}
}Inside the result frame, the viewport is the frame itself, so the layout follows the width of the lesson column.