Z-index

noun

say it: “ZEE IN-deks” /ˈzi ˌɪndɛks/ or “ZED IN-deks” /ˈzɛd ˌɪndɛks/

The CSS property that decides which overlapping positioned elements sit in front: a higher number is drawn closer to you.

What does z-index do?

z-index decides which positioned elements appear on top when they overlap: higher numbers sit in front.

.dropdown-menu { position: absolute; z-index: 10; }

In a sentence

  • “I gave the dropdown a z-index of 10 so it opens over the photos instead of behind them.”

Level: Apprentice · More CSS terms at this level

Updated