What You May Not Know About Z-Index

Avatar of Chris Coyier
Chris Coyier on

DigitalOcean provides cloud products for every stage of your journey. Get started with $200 in free credit!

It controls which element is “on top” visually when they happen to overlap, right? Right. But there is more to the stacking order, much of which you can’t control. You can control stacking contexts though, which kind of reset the playing field within them, but themselves can be stacked. Steven Bradley explains.

Related: Jake Archibald also encountered this and has a little more info. Paul Lewis explains how this (kinda sucky) situation is unique to the web. Philip Walton explains yet another way.

Direct Link →