Skip to content

CSS Layout Systems

Modern layout techniques that power every production UI. Flexbox for one-dimensional flow, Grid for two-dimensional layout, responsive design, and container queries.

1
Flexbox Fundamentals
beginner

The main axis vs cross axis mental model, flex-grow/shrink/basis mechanics, alignment properties, and the flex shorthand that every production layout depends on.

11 min read
2
Flexbox Advanced Patterns
beginner

The holy grail layout, sticky footer, equal-height cards, the last-row alignment problem, and the flexbox gotchas that trip up even experienced developers.

11 min read
3
CSS Grid Fundamentals
beginner

The grid template model, the fr unit and how it distributes space, auto-fill vs auto-fit for responsive grids without media queries, gap, and grid item placement.

11 min read
4
CSS Grid Advanced Patterns
beginner

Named grid areas for readable layouts, subgrid for nested alignment, overlapping grid items, and building fully responsive layouts without a single media query.

11 min read
5
Responsive Design and Media Queries
beginner

Mobile-first strategy, choosing breakpoints based on content not devices, fluid design with clamp(), when media queries are still necessary, and the responsive design decision framework.

11 min read
6
Container Queries
beginner

@container and container-type: component-level responsiveness that responds to the component's own size, not the viewport. The paradigm shift for reusable components.

10 min read
7
Position Sticky and Fixed
beginner

How sticky scroll actually works, the seven reasons sticky positioning fails, fixed viewport issues on mobile, and the containing block traps that break both.

10 min read
8
Viewport Units and Fluid Typography
beginner

dvh vs svh vs lvh and why vh is broken on mobile, building a fluid type scale with clamp(), and the math behind viewport-relative sizing.

9 min read
9
Logical Properties and Internationalization
beginner

Inline vs block direction, margin-inline vs margin-left, and building layouts that work in any writing direction — LTR, RTL, vertical. The foundation for true internationalization.

10 min read
10
Quiz: Flexbox vs Grid
beginner

8 'which layout tool for this design?' scenarios. Test your ability to choose between flexbox and grid based on the layout requirements.

6 min read