HTML and CSS Reference
The z-index property applies to any positioned box and can be used to
control the layering of boxes from back to front. The higher the integer
value, the “closer” to the viewer the element appears.
Think of this index as controlling the elements of a stage set in the
theater. The background elements are at the 0 position, the actors and
other elements may shuffle between 1 and 20, and the foreground set
pieces and the curtain are between 21 and 25 (though there is no limit
to this value). What happens if two elements in the same stack are at
an index of 11 (or 0 or auto)? This isn't a problem unless each element's
positioning properties cause them to overlap. In this case, the element
specified later in the document flow will appear on top.
This index, like positioning offsets, is relative to the containing block.
If one element has a z-index of 4 and another element has a z-index
of 3, none of the second element's children can ever appear “above”
the content of the former element.
note Some plug-in content such as Adobe Flash can sometimes bleed
though HTML content positioned above it and given a higher z-index .
For Flash, in particular, there is a window mode parameter called wmode that
when set to opaque or transparent will allow content to appear above it in