Přejít k hlavnímu obsahu
← 🎨 CSS as a design system·Modul B9 · Lekce 5
ÚkolBuild .nav: display: flex, justify-content: space-between, align-items: center, padding: var(--space-md) var(--space-lg), border-bottom: 1px solid var(--border). .nav .brand is bold + var(--primary). .nav-links is a flex row with gap: 24px, links have color var(--text), text-decoration: none, padding: 8px. .nav-links a:hover { color: var(--primary); }. .nav .cta is a button with background var(--primary), color white, padding 8px 16px, border-radius var(--radius-md). @media (max-width: 640px) { .nav-links { display: none; } }.

Capstone 5: Navigační záhlaví (responzivní)

200 XP14 min
Teorie

A responsive header that ships everywhere

  • Brand on the left.
  • Primary nav links in the middle.
  • CTA button on the right.

On mobile (<640px), the nav links hide and a hamburger appears. The actual menu-toggle JS is for the JS track — here we just style the layout + the visible/hidden states via a checkbox hack.

🔒

Zaregistruj se a začni programovat

Teorie je otevřená pro každého. Editor, živý náhled a check se odemknou s 7denní zkušební verzí zdarma — karta vyžadována, zrušíš kdykoli.

Registrace — zkušební verze zdarma →

Prvních 10 lekcí v každé trase je zdarma. Karta není potřeba.

← PředchozíDalší lekce →

Jeden tip k Pythonu nebo webu denně — e-mailem

Krátké, ručně psané, žádný spam. Odhlásit jedním klikem.