The z-index property and its problems

Outer div
z-index: 1;
z-index: 2;
Outer div
z-index: 3;
z-index: 1;
Outer div
z-index: 4;
z-index: 2;

Who's correct?

So.. Internet Explorer is creating like 3 piles (because of the outer 3 positioned div elements). Inside these piles IE is calculating 3 different z-index 'ranges' (or stacking contexts according to the specification). Firefox, Mozilla, Opera, Safari and Konquerer all act the same, throwing all z-index numbers on one huge pile. IE is wrong.

Adding z-index: 0; to the outer div elements

This makes Moz, Opera, Safari and Konquerer behave like IE.

Adding z-index: auto; to the outer div elements

Toggling?

I don't know how to let IE render the piles the same way Moz/Opera does. Would be handy if you could toggle between both modes. At least for Opera and Mozilla you can. Yay :)


Frixon used my example to write some more text.


Home - More stuff