Перейти к основному содержимому
← 🎨 CSS as a design system·Модуль B2 · Урок 14
ЗаданиеBuild the full layout. <header class='nav'><strong>Brand</strong><a class='login'>Log in</a></header>. <div class='layout'><aside class='sidebar'>Sidebar</aside><main class='main'><div class='cards'> with 3 .card divs labeled 1/2/3 </div></main></div>. <footer class='footer'><div>Footer col 1</div><div>Footer col 2</div><div>Footer col 3</div></footer>. Styles: .nav flex with space-between + padding 16px 24px + bg #18181B + color white. .layout flex min-height 300px. .sidebar flex 0 0 200px + bg #f5f5f5 + padding 16px. .main flex 1 + padding 24px. .cards flex wrap gap 12px. .card flex 1 1 120px + padding 16px + bg #eef + border-radius 8px. .footer flex + padding 16px 24px + bg #18181B + color white. .footer > div flex 1.

Завершающий этап модуля: полностью адаптивный макет

200 XP14 min
Теория

Putting B2 together

Build a complete page layout using ONLY flexbox. The page has:

  • A header with logo (left) and login link (right).
  • A main content area that's a sidebar + main split.
  • A footer with 3 navigation columns side-by-side.

Each section uses a different flex pattern from this module:

  1. Header — justify-content: space-between (lesson 5).
  2. Layout — fixed sidebar + flex: 1 main (lesson 9).
  3. Card row in main — flex-wrap + gap (lessons 7-8).
  4. Footer — three equal columns with flex: 1 each.

This is the kind of layout every SaaS dashboard ships. After you can build this from scratch, flexbox is muscle memory.

🔒

Зарегистрируйся чтобы кодить

Теория открыта всем. Интерактивный редактор, живой превью и проверка открываются с 7-дневным бесплатным trial — нужна карта, отмена в любое время.

Регистрация — бесплатный trial →

Первые 10 уроков в каждом треке — бесплатные. Карта не нужна.

← НазадСледующий урок →

Получай один совет по Python или веб-разработке — каждый день в почте

Коротко, без воды, без спама. Отписаться — в один клик.