Chapter 6 — CSS Units and Overflow

Choose what controls a size and decide what excess content should do.

New concepts

px, percentages, rem, em, classic viewport units, modern viewport units, and visible, hidden, auto, or scroll overflow.

Read the Phase 5 gauge

What changed?

Phase 4 defines size constraints. This chapter chooses the reference used to measure them and determines what happens when content exceeds them.

Lessons

  1. 1. px, %, rem, and em
  2. 2. vh, vw, svh, lvh, and dvh
  3. 3. Overflow comparison

Checkpoint

Create a constrained panel using rem, then compare hidden and auto overflow. Confirm that important content remains reachable.