DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
CSS Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
CSS
A card component needs to lay out differently depending on whether it's placed in a wide page section or a narrow sidebar, at the SAME browser viewport width. What's the right tool?
A
A regular @media (min-width: ...) query
B
A @container query, since the relevant dimension is the component's own container width, not the viewport
C
JavaScript window.innerWidth checks
D
This cannot be solved with CSS
Check Answer