The z-index property sets the stack order of the boxes.
When you set this property, the relative, absolute, or fixed value must be specified for the position property.
#example {
position: absolute;
top: 10px;
left: 30%;
z-index: 0;
}
Property |
Value |
Explanation |
z-index |
number or auto |
the box with the higher number will appear in front |
The default is "auto".
Example