Solve your z-index issues | z-index and stacking context explained

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI18 min

About this video

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