Name

z-index — NN 4 IE 4 CSS 2

Synopsis

Inherited: No

For a positioned element, sets the stacking order relative to other elements within the same parent container. See Chapter 4 for details on relationships of element layering amid multiple containers.

CSS Syntax

z-index: integer | auto

JavaScript Equivalent

zIndex

Value

Any integer value. A value of auto is the same as a value of zero. When all elements in the same parent container have the same z-index value, the stacking order is determined by element source code order.

Initial Value

auto

Example

DIV#instrux {position: absolute; left: 50;top: 70;z-index: 2}

Applies To

Any positioned element.

Object Model Reference

IE

[window.]document.all.elementID.style.zIndex

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.