NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix b » css1 / css2 properties


This property defines a layering context with relative or absolute positioning for elements containing other elements. By default, overlapping elements stack in the order in which they are defined in an HTML/XHTML document. This property can override default layering by assigning numeric layering values to an element, with higher numbers layering above lower numbers. The auto value tries to determine the z-placement of an element automatically by its order in the document.


#div1 {position: absolute; top: 20px; left: 20px; height: 50px; width: 50px;
background-color: blue; z-index: 2;}

Browser and CSS Support Notes

IE 4, 5, 5.5, 6
Nav 4, 4.5-4.8, 6, 7
Opera 4, 5, 6, 7

(X)HTML Elements
CSS Properties
Back: word-spacing.htm Next: aural properties
< Home | About | Chapters | Examples | Errata | Reference | Site Map >