Top of the order


Override the element's normal stacking order, allowing it to be positioned above or below any overlapping elements.

Property values

When two elements overlap each other, one of them is said to be "above" the other in the terms of vertical stacking. The higher element is displayed on top of the lower element, which is partially or wholly obscured by it.

By default, each element has a z-index equal to 0. In order force an element to be above its sibling, specify a z-index higher than those siblings. Use a positive integer to raise the element's stacking order. Use a negative number to lower its stacking order.

For elements with position:static this is not an issue, because they will not overlap.


z-index: 2;

style > position > z-indexTop of the order