topskill.dev
CoursesTracks
0
All courses/CSSFlexbox Navigation
Flexbox
9 / 11
← CSS
○CSS Rule Style an Exhibit Card○Write Your First CSS Rule○CSS Selectors Target Exhibit Details○Target Exhibit Details○Apply CSS Three Sources○Apply CSS Three Ways○Specificity Resolve a Style Conflict○Resolve Specificity○Inheritance and the cascade✦Module Quiz
○Color Palette○Color Palette○Background Layer○Background Layer○Type Rhythm○Type Rhythm○Borders and Shadows○Borders and Shadows✦Module Quiz
○Box Model Seed Packet Card○Space a Seed Packet○Display Swap Table Labels○Arrange Swap Table Labels○Positioning Pickup Pin○Pin the Pickup Location○Sizing and Overflow○Size a Seed-Swap Notice○Sticky scroll headings✦Module Quiz
○Advanced Selectors Book Cart Sign○Target a Book Cart Sign○Pseudo-Classes Night Cart States○Style Night Cart States○Pseudo-Elements○Add a Book-Quote Mark✦Module Quiz
○Lantern Market navigation○Lantern Market navigation✦Module Quiz
○Community garden request card○Community garden request card✦Module Quiz
○Flex Direction○Flex Direction○Main-Axis Spacing○Main-Axis Spacing○Cross-Axis Alignment○Cross-Axis Alignment○Wrapping and Flex Items○Wrapping and Flex Items●Flexbox Navigation○Flexbox Navigation✦Module Quiz
○Grid Tracks○Grid Tracks○Grid Gaps○Grid Gaps○Grid Placement○Grid Placement○Responsive Grid○Responsive Grid✦Module Quiz
○River radio schedule○Harbor radio schedule✦Module Quiz
○Field note color system○Field note color system○Transforms○Rotate a Field Note○Resilient styles✦Module Quiz
○Kite festival signal○Garden festival signal✦Module Quiz
○Garden forecast○Harbor forecast○Fluid sizing○Fluid weather bulletin○Images that fit✦Module Quiz
○Seed inventory table○Tool checkout table✦Module Quiz
○Community maker profile○Maker profile sheet✦Module Quiz

Flexbox Navigation

Keep the expedition title and links together

This header combines the Flexbox properties you have just used. Inspect index.html: .nav-row has two direct children, a <strong> title and a .nav-actions group. The two links are inside that group. Flexbox arranges the title and the group, not all three pieces separately.

In style.css, display: flex makes those two children share a row. justify-content: space-between moves spare room between the groups. align-items: center lines up their vertical centers even though the padded links are taller than the title.

The supplied gap: 1rem keeps some space between the groups when little free room remains. The links use inline-block so they can sit beside one another with visible padding; they are not separate items in the outer flex row.

Run Preview and change justify-content to flex-start. The groups move together, but the gap stays. Restore space-between, then change align-items to flex-start and compare their top edges. Restore center.

This is a compact header, not a complete mobile navigation pattern. Very long labels can still need wrapping or a different arrangement; a gap cannot create unlimited room.

Hint 1
1 / 2
HINT 1

Open style.css and change one declaration at a time.

HINT 2

Run Preview after each change; restore the value before the exercise.

Files
  • ⋄index.html
  • ⋄style.css
Loading editor…