Interview practice question
A component must adapt to different container sizes
Frontend Engineering · HTML and CSS · Intermediate
A product card is used in a wide main area and a narrow sidebar on the same page. Media queries can't handle both. What do you do?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Container queries.
- container-type on wrapper.
- Different layouts per container width.
- Fallback default layout.
- Test in each placement.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.