Skip to content
Clairos Learn

Layout and responsive · Lesson 1 of 14 · 7 minutes

Layout and responsive: Flexible rows

A flex container lays out its direct children along a main axis; gap separates items.

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

Current edit

PreviewNo external resources

Understand the pattern

A flex container lays out its direct children along a main axis; gap separates items.

A flex container lays out its direct children along a main axis; gap separates items.

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: flex; }
.layout { gap: 1rem; }
.layout { align-items: center; }

A flex container lays out its direct children along a main axis; gap separates items.

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 flexible rows?

Apply it elsewhere

You reuse flexible rows 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: Wrapping navigationTry 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: Wrapping navigationAllow a navigation row to wrap rather than force links beyond a narrow viewport.Practice
  2. 02Layout and responsive: Two-column gridFractional grid tracks share available space. minmax(0,1fr) lets long content shrink within a track.Practice
  3. 03Layout and responsive: Repeatable card gridauto-fit repeats as many tracks as fit; the minimum controls when cards wrap.Practice