Skip to main content

What are Container Queries?

Container Queries are a mechanism in CSS that lets you change an element's styles not based on the width of the whole screen (as with media queries), but based on the size of its parent container. This makes components truly responsive: a block adapts to the place it is in, not to the entire page.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.