Why is z-index ignored with position:static?

Because position: static means “Ignore all the positioning instructions from left, top, z-index, etc.”.

'z-index'
Value:      auto | <integer> | inherit
Initial:    auto
Applies to:     positioned elements

— http://www.w3.org/TR/CSS21/visuren.html#z-index

An element is said to be positioned if its ‘position’ property has a value other than ‘static’.

— http://www.w3.org/TR/CSS21/visuren.html#positioned-element

Leave a Comment