Welcome to Fluid and Intrinsic Layouts. People zoom in, read on small phones, and drop your components where you didn’t plan for them. This second course in the Modern CSS and Accessible Interfaces path builds layouts that cope with all three, and it stands on its own, so you can start it here.
You’ll work on the site of Westbrook’s public pools. Rosa, a dawn swimmer, checks the times on her phone and plans her week on her laptop, but the council’s site lets her down. Its heading doesn’t grow when she zooms the page. One long pool name knocks the cards out of line. And the full-height header doesn’t fit her screen. Its last 80 pixels hide under her phone’s toolbar.
What You’ll Learn
By the end of this course, you’ll be able to build layouts whose type and spacing scale smoothly, whose cards line up across a row with subgrid, and whose components adapt to the space they’re given with container queries and units.
Along the way, you’ll:
- Make type and spacing fluid
- Line up the pool cards with subgrid
- Fit one session card to two containers
- Make the full-height header fit Rosa’s phone
- Rebuild the Westbrook Pools timetable pages in a project
Before You Start
You need HTML and CSS through the cascade, the box model, flexbox and grid, media and container queries, and custom properties. You also need a current version of Chrome or Edge and an editor with a live preview. You won’t write any JavaScript in this course.
The starting stylesheet uses cascade layers, custom properties named by their role (such as --color-surface), and logical properties. You don’t need the path’s first course for these, because each lesson recaps what it needs from them.
How the Course Works
Videos and text lessons alternate with coding exercises. Their automated tests check your CSS rules, such as whether a font size uses clamp(). They can’t see the layout itself, so you check that in your browser’s live preview. At the end come a project, a chat with the RealJS mentor about your choices, a quiz, and a summary.
The course page’s download has the starting site, the finished one, and the slides. Before the next lesson, open the starting site in your live preview, in a narrow window like Rosa’s phone.
Next comes a text lesson: Make Fluid Headings That Still Zoom.