Explains CSS stacking context and why z-index only applies within it, including how properties such as transform and opacity create new stacking contexts. Works through layering problems that arise when styling real pages, with CodePen examples.
What you’ll learn
✓Explain how a stacking context limits the effect of z-index
✓Identify CSS properties such as transform and opacity that create a stacking context
✓Debug unexpected layering problems in real page styles