Google Chrome not respecting z-index

vulgarbulgar picture vulgarbulgar · Jun 16, 2011 · Viewed 34.3k times · Source

As per the title, it seems only Chrome isn't playign along. Note that form fields cannot be clicked on which are on the left portion of the screen. This only occurs on some pages (such as the Contact page). It appears that the #left_outer div is overlaying the content. When I edit the css via Firebug or Chrome's dev toools, it works, when I edit the actual css and refresh, it does not.

Any ideas?

LINK:

Thanks!

Answer

markt picture markt · Jun 16, 2011

Usually when you have set the z-index property, but things aren't working as you might expect, it is related to the position attribute.

In order for z-index to work properly, the element needs to be "positioned". This means that it must have the position attribute set to one of absolute, relative, or fixed.

Note that your element will also be positioned relative to the first ancestor that is positioned if you use position: absolute and top, left, right, bottom, etc.