VibeDict

z-index (Stacking Order)

z-index (Stacking Order)

A number that decides which box comes out on top when boxes overlap.

💡 It's like a stack of papers on a desk: you see whichever one is on top.

👆 Try it yourself

It really works — click around and see.

Blue
Purple
CSS.Purple { z-index: 10; } .Blue { z-index: 1; }

🤖 Say this to your AI

The dropdown menu is being hidden behind the card below it. Raise the dropdown's z-index (stacking order) so it always shows on top.

The key word is ‘z-index (Stacking Order)’. Including it helps AI understand you much more precisely.

📌 Good to know

Problems like 'something is hiding behind something else' or 'it's getting covered up' are almost always z-index issues.

When to use it

  • When a modal or dropdown hides behind something else
  • When content slides over the sticky header

Also called: stacking order, bring to front, hidden behind, covered up, layers, on top, zindex

Related terms