Build resilient page layouts with modern CSS
8 steps · about 4 h 55 min · Intermediate
- Review normal flow (guide, MDN Web Docs, 30 min)
Understand the default layout before deliberately changing it.
- Align one-dimensional groups (guide, MDN Web Docs, 40 min)
Use Flexbox for navigation, toolbars and components that flow along one axis.
- Define a two-dimensional grid (guide, MDN Web Docs, 45 min)
Place page regions by rows and columns while allowing content to reflow.
- Choose Grid or Flexbox (reference, MDN Web Docs, 30 min)
Select the layout model that matches the relationship between items.
- Design responsive breakpoints (guide, MDN Web Docs, 40 min)
Let content needs determine adaptations instead of copying device widths.
- Respond to component space (reference, MDN Web Docs, 35 min)
Adapt a reusable component to its container rather than only the viewport.
- Use logical dimensions (reference, MDN Web Docs, 30 min)
Make spacing and alignment work across writing directions.
- Stress-test the finished shell (guide, web.dev, 45 min)
Check narrow, wide, zoomed and content-heavy states before considering the layout complete.