CSS layout has changed more in the last few years than in the decade before. Grid, subgrid, container queries and :has() now work in every major browser, so layouts that once needed JavaScript or nested wrappers take a few lines of CSS. This course teaches modern layout from first principles, so you can build responsive pages confidently and understand why they work.

What you'll learn

  • The box model, normal flow and how sizing really works
  • Flexbox for one-dimensional layouts: alignment, wrapping, gap and flexible sizing
  • CSS Grid for two-dimensional layouts: tracks, fr units, areas and auto-placement
  • Responsive grids with repeat(), auto-fit and minmax() without media queries
  • Subgrid for aligning content across cards and nested components
  • Container queries and container query units for components that adapt to their space
  • Fluid type and spacing with clamp() and viewport units
  • Logical properties for layouts that work in any writing direction
  • Selecting by context with :has(), and organising styles with cascade layers
  • Debugging layouts with browser DevTools grid and flex inspectors

Who it's for

  • Beginners who know basic HTML and CSS and want to build real layouts
  • Developers who still rely on floats, frameworks or trial and error for layout
  • Designers who want to understand what is possible in the browser today

Prerequisites

Outcomes

By the end of this course you will be able to:

  1. Choose between Flexbox and Grid for any layout problem.
  2. Build responsive page layouts and components with little or no media query code.
  3. Create components that adapt to their container using container queries.
  4. Debug layout issues quickly with browser DevTools.

Course outline

ModuleTopic
1Normal flow, the box model and sizing
2Flexbox fundamentals and alignment
3Flexbox patterns: navbars, media objects and wrapping
4CSS Grid: tracks, lines and areas
5Responsive grids with auto-fit and minmax()
6Subgrid and aligning nested content
7Media queries and mobile-first design
8Container queries and container units
9Fluid typography and spacing with clamp()
10Logical properties, :has() and cascade layers
11Debugging and browser DevTools
12Project: a responsive landing page and component set

FAQ

Do I need a CSS framework?

No. This course uses plain CSS. Frameworks like Tailwind are useful, but they are easier to use well once you understand layout itself. Tailwind CSS in Practice is a good next step.

Are container queries safe to use now?

Yes. Size container queries are supported in all current major browsers. We also show how to check support for newer features before relying on them.

Will this help with accessibility?

Yes. We cover how visual order and source order interact, and why layout should not change the meaning of your content.

How do I join?

Get in touch and we'll share the current format, schedule and enrolment details.