Q1. What is z-index?
z-index controls the stacking order of overlapping elements. Higher values appear on top.
Q2. When does z-index work?
z-index only works on positioned elements (non-static).
Q3. What is the default z-index value?
Default is auto, which means element doesn't create new stacking context and inherits parent's stacking level.
Q4. What is stacking context?
Stacking context is a group of elements with same parent. z-index values are compared within same context.
Q5. Can z-index be negative?
Yes, negative values can place elements behind others, but they may go behind parent background.
