blog
HOME · CREATIVE · WEB · TECH · BLOG

Friday, April 6th, 2007

CSS Z-Index Can’t Have Negative Values In Firefox

If the CSS layers that you see in Internet Explorer and Safari aren't visible in Firefox (2.0 Mac/Win) the problem could be that you have a negative z-index value on your layer. While w3schools.com says negative values are allowed, they don't work, so keep your z-index values positive.

Tags: ,
Categories: CSS, Firefox

7 Comments

  1. Asa Says:

    This is a bug in Gecko and is already fixed in what will become Firefox 3. It will not be fixed in Firefox 2.

    More information is available at https://bugzilla.mozilla.org/show_bug.cgi?id=78087

    - A

  2. Andy Says:

    Well it’s not so much a bug as a different interpretation of standards. If you give your body a z-index it will become a stacking context; your z-index=-1 divs will then hopfully appear in it as you expected.

  3. Ryan Says:

    Yeah, I spent 1 hour trying to figure out why my images weren’t showing up. Apparently only use positive z-indexes. lol

  4. Xay Says:

    Even if it stacks below other elements, transparency would allow us to see the lower element. but it is as if Gecko doesn’t draw the element at all.

  5. Mike Says:

    You’re right,

    Still in 2.0.0.12 firefox doesn’t take a negative value for z-order. Maybe it is on the CSS specs, but I don’t know yet.

    Thanks.

  6. scape Says:

    nor does it take 0 in, which makes no sense to me as 0 is the basis of all integer variables in any computer language I have used…

  7. Ken Says:

    Actually, the display was fixed in FF3, but links will not work in a container with a negative index :( Its a bug.

Leave a Reply

HOME · CREATIVE · WEB · TECH · BLOG