Note that z-index stacking applies only to sibling
elements (i.e., elements that are children of the same container). If
two elements that are not siblings overlap, setting their individual
z-index attributes does not allow you to specify
which one is on top. Instead, you must specify the
z-index attribute for the two sibling containers
of the two overlapping elements.
Nonpositioned elements are always laid out in a way that prevents
overlaps, so the z-index attribute does not apply
to them. Nevertheless, they have a default z-index
of zero, which means that positioned elements with a positive
z-index appear on top of the normal document flow,
and positioned elements with a negative z-index
appear beneath the normal document flow.
Note, finally, that some browsers do not honor the
z-index attribute when it is applied to
<iframe> tags, and you may find that inline
frames float on top of other elements, regardless of the specified
stacking order. You may have the same problem with other
"windowed" elements such as
<select> drop-down menus. Fourth-generation
browsers may display all form-control elements on top of absolutely
positioned elements, regardless of z-index
settings.