Build resilient page layouts with modern CSS

8 steps · about 4 h 55 min · Intermediate

  1. Review normal flow (guide, MDN Web Docs, 30 min)

    Understand the default layout before deliberately changing it.

  2. Align one-dimensional groups (guide, MDN Web Docs, 40 min)

    Use Flexbox for navigation, toolbars and components that flow along one axis.

  3. Define a two-dimensional grid (guide, MDN Web Docs, 45 min)

    Place page regions by rows and columns while allowing content to reflow.

  4. Choose Grid or Flexbox (reference, MDN Web Docs, 30 min)

    Select the layout model that matches the relationship between items.

  5. Design responsive breakpoints (guide, MDN Web Docs, 40 min)

    Let content needs determine adaptations instead of copying device widths.

  6. Respond to component space (reference, MDN Web Docs, 35 min)

    Adapt a reusable component to its container rather than only the viewport.

  7. Use logical dimensions (reference, MDN Web Docs, 30 min)

    Make spacing and alignment work across writing directions.

  8. Stress-test the finished shell (guide, web.dev, 45 min)

    Check narrow, wide, zoomed and content-heavy states before considering the layout complete.