Z-index working in ie8, not ie7

For some reason, z-index works for one specific element in IE8, but not in IE7 (or if I use IE7 pseudo-compatibility in IE8). It works for all other elements. The only difference is that this element has a negative z-index, so I tried to use the positive one of 1 and yet, it is the only one that does not work.

The part that doesn't work is this:

.passport {
    position: absolute;
    left: -130px;
    z-index: -2;
}

And he is attached to this image, which should be under everything else:

<img src="http://www.blahblahblah.com/image.png" class="passport">

Everything else has a positive z-index of 2 or higher (which is why I used 1 for the index when trying a positive one to see if this helped). Since the code is now, this image is under everything else in IE8, but, as I said, not in IE7. This is not the actual image path, by the way, I just changed it here for privacy purposes.

, ? , , - z-, IE7, IE8, , , , : static ( , , ) , , javascript .

, , , . , , , -, , , "" . http://css-discuss.incutio.com/wiki/Overlapping_And_ZIndex

, , , , , . , IE8, IE7, , ?

, , , , . !

+3

All Articles