Name

z-index

Values:

<integer> | auto | inherit

Initial value:

auto

Applies to:

Positioned elements.

Inherited:

No.

Computed value:

As specified.

Description:

This property sets the placement of a positioned element along the z-axis, which is defined to be the axis that extends perpendicular to the display area. Positive numbers are closer to the user, and negative numbers are further away.

Example:

#masthead {position: relative; z-index: 10000;}

Supported by:

Firefox, Internet Explorer, Opera, Safari.

Get CSS Pocket Reference, 3rd Edition 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.