DEV Community

Discussion on: A Better Way to Manage Z-Indexes

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

Just do this

div {
    z-index: 9e1;
    z-index: 9e2;
    z-index: 9e3;
}
Enter fullscreen mode Exit fullscreen mode

Nobody will beat you in a z-index war 😂🤓

Collapse
 
mimafogeus2 profile image
Miki Stanger
Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

Would you rather have a pet 🐴 or 🦓? I prefer simplicity, it's much harder to clean a zebra than a horse, sincerely a mad developer

Collapse
 
larsejaas profile image
Lars Ejaas

There is actually a maximum value for z-indexes. it's 2147483647 in most browsers.

stackoverflow.com/questions/491052...

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

I know, there was a famous YT vid on the subject a few years back, but that won't stop me trying, besides 9 × 10³ is nowhere near the theoretical limit so we won't get arrested 🚨