Mobile-first CSS writes the default layout for small screens first, then adds @media (min-width: ...) blocks to enhance at larger widths. This lesson shows one layout shifting from a single column to two columns to a three-column split with a wider primary area.

Note: The playground preview is a fixed-size iframe. The breakpoints in this demo fire at 700px and 1024px — resize your browser window and open the standalone file once it is published to see each layout stage. The playground shows the single-column (mobile) state by default.

What this covers

  • Writing the mobile default before any media queries
  • @media (min-width: 700px) to switch to two columns
  • @media (min-width: 1024px) to add a wider primary column alongside two narrower ones

Responsive breakpoints specimen

Preview