Stop Using Media Queries! Try This Modern CSS

CSSnippets on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateWeb Design7 min

About this video

A step-by-step CSS tutorial on container queries, showing how components can respond to their parent container's size instead of the viewport. It covers container-type, container-name, and container query length units.

What you’ll learn

  • Write @container queries that respond to a parent container's width
  • Use container-name to target specific containers when several appear on one page
  • Size text and layout with cqw, cqh and cqi length units