Explain it in 60 seconds
z-index and stacking contexts
Frontend Engineering · HTML and CSS · Beginner
How does z-index work, and what is a stacking context?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- z-index controls stacking of positioned elements.
- Only works on positioned/flex/grid items.
- Stacking context groups elements; children can't escape parent's level.
- Created by position+z-index, opacity <1, transform, etc.
- Common cause of "z-index not working".
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.