Layout and responsive: Wrapping navigation
Allow a navigation row to wrap rather than force links beyond a narrow viewport.
Current edit
Understand the pattern
Allow a navigation row to wrap rather than force links beyond a narrow viewport.
Allow a navigation row to wrap rather than force links beyond a narrow viewport.
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
nav { display: flex; }
nav { flex-wrap: wrap; }
nav { gap: 0.75rem; }Allow a navigation row to wrap rather than force links beyond a narrow viewport.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Layout and responsive: Two-column gridTry an incident drillAnonymous 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
- 01Layout and responsive: Flexible rowsA flex container lays out its direct children along a main axis; gap separates items.Practice
- 02Layout and responsive: Two-column gridFractional grid tracks share available space. minmax(0,1fr) lets long content shrink within a track.Practice
- 03Layout and responsive: Repeatable card gridauto-fit repeats as many tracks as fit; the minimum controls when cards wrap.Practice