Minimum and maximum z-index
#CSS
Table of Contents
A bit about z-index
The z-index
CSS property changes the stacking order of positioned elements (those with the position
property set to values other than static
) and their descendants or elements within flex
and grid
.
Key points about z-index
:
- Not inherited.
- For positioned elements it defines the stacking level within the current stacking context.
- Determines whether a local stacking context is established
Minimum and maximum value of z-index
The z-index
can take any value within the range of -2147483648
to 2147483647
in most browsers. These values correspond to the range of integers representable in 32-bit systems. In other words the minimum value for z-index
is -2147483648
and the maximum is 2147483647
.
Attempting to set a value beyond this range will cause z-index
to be set to either the minimum or maximum value depending on the context.