Command Palette

Search for a command to run...

Hectal
Phase 7: Flexbox
CSS · Exercise 4 of 6 PreviousNext
Intermediate

A sidebar that doesn't break

Make a two-column layout: .side is 80px wide and never shrinks, .main takes all the remaining width of .layout, with a 12px gap.

.main contains a 600px-wide code block. It must not push the layout wider than the page: the code block should scroll inside .main instead (it already has overflow-x: auto).

What Check tests

  1. The sidebar is 80px wide
  2. Sidebar and main sit side by side, 12px apart
  3. Main ends exactly at the layout's right edge
  4. The page doesn't scroll sideways

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.