Thursday, 26 August 2010

How the Z-index Attribute Works for HTML Elements

There are many ways to classify elements on a Web page. For the purposes of this article and the z-index attribute, we can divide them into two categories: windowed and windowless.

Windowed Elements

* <OBJECT> tag elements
* ActiveX controls
* Plug-ins
* Dynamic HTML (DHTML) Scriptlets
* SELECT elements
* IFRAMEs in Internet Explorer 5.01 and earlier

Windowless Elements

* Windowless ActiveX controls
* IFRAMEs in Internet Explorer 5.5 and later
* Most DHTML elements, such as hyperlinks or tables

All windowed elements paint themselves on top of all windowless elements, despite the wishes of their container. However, windowed elements do follow the z-index attribute with respect to each other, just as windowless elements follow the z-index attribute with respect to each other.

All windowless elements are rendered on the same MSHTML plane, and windowed elements draw on a separate MSHTML plane. You can use z-index to manipulate elements on the same plane but not to mix and match with elements in different planes. You can rearrange the z-indexing of the elements on each plane, but the windowed plane always draws on the top of the windowless plane.

http://support.microsoft.com/kb/177378

No comments:

Post a Comment