How to make responsive web apps with container queries

Responsive web design has been around for years now, and in that time we’ve seen a drastic shift in how we approach website development. Media queries let us write CSS based on a variety of conditions, such as resolution, media type and – most popularly – browser viewport dimensions. 

Flexbox. The content stretches to fill the column it’s in Left: Lining up - When space is tight, Flexbox automatically reflows the right column underneath the left column, and the content grows to fill it

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

Jonathan Snook is a designer and developer from Ottawa, Canada. He writes about tips, tricks, and bookmarks on Snook.ca and has written the successful, self-published book, Scalable and Modular Architecture for CSS.

Latest in Responsive Design
website mockups
Mobile website design: Why is it important and what is the process?
AR design: iFly380
8 golden rules for AR design
Mobile design: Apes gather in front of a Monolithic black smartphone; it glows with various UI elements. In the background lies a mountain range lit by a rising sun that radiates out in concentric circles.
8 golden rules of mobile design
Progressive web apps
PWAs: Welcome to the mobile revolution
Customise sites with these responsive WordPress themes
6 great tools for testing responsive design for websites
Latest in Features
Tesla logo
The history of the Tesla logo: from car badge to global tech brand
Nintendo and AI art; a vibrant illustration showcases a large group of popular video game characters, seemingly from the Mario franchise
Mario and Zelda creator rejects AI to "find what makes Nintendo special" – what we can all learn from Shigeru Miyamoto
Selection of Guinness ads throughout the ages
The best Guinness adverts of all time – from the toucan to a singing pint
Tina Touli headshot
"The 9 to 5 work routine was draining my creativity”: a day in the life of Tina Touli
Promise Mascot Agency;
How Ikumi Nakamura's 'art bible' helped create Promise Mascot Agency's grotesque mascots, and why collaboration in indie game development is vital
Stanley 'Artgerm' Lau discuses AI; a digital illustration showcases a stylised female figure, reminiscent of a comic book superhero, likely Supergirl, with vibrant colours and a dynamic pose
"In the future, there will be fewer artists like me – real artists" says Stanley 'Artgerm' Lau as he reflects on the dangerous impact of AI on art