Problem Statement
Explain how z-index and stacking context work together.
Explanation
z-index defines how elements overlap along the z-axis. It works only on positioned elements. Each positioned element can create a new stacking context, meaning its children are stacked independently from the rest of the page. Higher z-index values appear above lower ones within the same context.
Code Solution
SolutionRead Only
.popup { position: relative; z-index: 10; }