CSS z-index Property Explained

What the CSS z-index property does, with an example.

Published November 4, 2026

The CSS z-index property controls the stacking order of positioned elements that overlap.

Key points

  • Check browser compatibility on a resource like caniuse.com if targeting older browsers

Example

z-index: 10;
More CSS articles