HTML Dog
Skip to navigation

CSS Property: z-index

The placement of a positioned box in the z-axis.

The z-index example page demonstrates how the stacking order of positioned boxes can be reversed.

Possible Values

ValueNoteExample
[integer]The higher the number, the higher the box will be in the stack (the “closer” it will be to the user as they look at the display).3
autoDefault.
inherit
initial
unset

Example


div { position: absolute; }

#kidkoala { z-index: 2 }

#mrscruff { z-index: 1 }

Browser support