Responsive CSS Layouts with Grid and Subgrid
For developers who know CSS basics and want modern, responsive layouts with fewer media queries. You will work through fluid sizing, grid techniques, logical properties and relative colour, plus the markup behind them.
6 lessons · 71 min, plus 1 optional (39 min more with the optional lessons)
- Beginner (not covered)
- Intermediate
- Advanced (not covered)
What you’ll learn
- Size type, spacing and images fluidly with min(), clamp() and aspect-ratio
- Align card content across rows using subgrid so buttons and text line up
- Break elements out of a grid on desktop and restore the layout on mobile
- Use logical CSS properties so layouts suit different writing modes and directions
- Derive a colour palette and overlays from one base colour with relative colour syntax
Lessons
Coding2GO 10 min Intermediate
Start here: fluid sizing with min(), clamp() and aspect-ratio, so later layouts scale without extra breakpoints.
A CSS tutorial on five tips for responsive layouts, using min(), clamp() and aspect-ratio to make padding, font sizes and images scale without media queries. It also touches on accessibility and modern CSS features.
- Lesson 2:
Break The Grid — In a Responsive Way
A Designer Who Codes 17 min Intermediate
Adds responsive grid rules, breaking out of the grid on desktop and restoring it on mobile.
A tutorial on breaking out of a CSS grid layout for desktop and returning it to its original arrangement on mobile screens. It is aimed at people who already build responsive web layouts.
- Lesson 3:
Learn CSS Subgrid for Perfect Alignment
Coding2GO 4 min Intermediate
Adds subgrid, so card content aligns across tracks even when text lengths differ.
Shows how CSS subgrid lets child elements inherit a parent grid's rows or columns, so buttons and text blocks in cards line up even when their content lengths differ. Covers setting grid-template-rows and grid-template-columns to subgrid for responsive card layouts.
A Designer Who Codes 15 min Intermediate
Applies responsive positioning to overlaid text, keeping it in place as an image resizes.
Shows how to place text at the bottom of an image so it stays positioned as the image changes size vertically, using CSS positioning. Suited to designers and developers building responsive web layouts.
JSHeroes 20 min Intermediate
Extends layouts to writing modes and text direction with logical properties and accessibility.
A conference talk on using CSS logical properties to build web layouts that adapt to different text directions and writing modes. It compares logical properties with traditional CSS properties and shows practical examples for real projects.
Coding2GO 5 min Intermediate
Adds relative colour syntax, deriving a full palette and overlays from one custom property.
A short CSS tutorial on the relative colour syntax in hsl(from ...), which derives a colour palette and transparent overlays from one custom property. It shows how this can reduce helper variables and simplify light and dark theming.
De Voorhoede 39 min Intermediate
Optional: explains why semantic markup matters, grounding the layout techniques in accessible HTML.
A talk by Hidde de Vries on the importance of markup in front-end development, given at the Front-end Forward Meetup.
Keep going
Want an easier start? Building and Polishing Websites with AI Tools
Search and sort within Responsive CSS Layouts with Grid and Subgrid
Sign in to mark lessons complete and see how far through you are.






