Skip to content
Clairos Learn

Layout and responsive · Lesson 11 of 14 · 7 minutes

Layout and responsive: Desktop media query

A min-width query layers a wider arrangement on top of a simple mobile-first layout.

Mastery 0/3Run itExplain itApply it
Web workshopInert preview · code inspection

Current edit

PreviewNo external resources

Understand the pattern

A min-width query layers a wider arrangement on top of a simple mobile-first layout.

A min-width query layers a wider arrangement on top of a simple mobile-first layout.

Misconceptions to reject

  • If the page fits one desktop viewport, no narrower viewport needs checking.
  • Hiding all overflow always makes content accessible.

The preview is a sanitized subset, not a full browser compatibility test.

Worked example and expected result
.layout { display: grid; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .layout { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.layout { gap: 1.25rem; }

A min-width query layers a wider arrangement on top of a simple mobile-first layout.

Try a variation

Adapt the final example to a different project name while retaining its structure and relationships. A different context still needs a real browser and accessibility check.

Explain it

Which statement correctly explains desktop media query?

Apply it elsewhere

You reuse desktop media query in a different project. What must still be verified?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Layout and responsive: Source orderTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Layout and responsive: Mobile media queryA max-width media query applies at and below its boundary; the base layout should remain usable without it.Practice
  2. 02Layout and responsive: Source orderVisual reordering can differ from keyboard and reading order. Preserve meaningful source order instead.Practice
  3. 03Layout and responsive: Overflow preventionShrinkable tracks and wrapping text solve causes of overflow without hiding inaccessible content.Practice