3 ms·
Out of curiosity, I wanted to know what the maximum z-index is. The CSS 2.1 spec doesn't present this information, but it turns out to be 2147483647 (the maximu
by supernintendo 11y ago
Out of curiosity, I wanted to know what the maximum z-index is. The CSS 2.1 spec doesn't present this information, but it turns out to be 2147483647 (the maximum value for a 32-bit integer).
Now what does that z-index say about the JavaScript developer who chose it? "Fuck it, 999999 is enough." Man, what a tool.
- rym_ 11y agoNot a JS developer at all, what does a zIndex of 99999 do?
- SquareWheel 11y agoThis is actually CSS, not JS. z-index sets the layer of an element, so a higher z-index means that content will appear above other content.
- mentando 11y agoWell it is a very high zIndex, which of would force the element in the plane 99999. What it says about the developer though, is that he didn't bother reading up on, what is the highest value, but just chose a rather high value of 99999.
- adrianN 11y agoClearly he wanted to future-proof his code. Maybe in a while he'll need to display an even more important message.
- DrJokepu 11y ago*signed 32-bit integer
- duderific 11y agoA one-second google search turned up this: http://stackoverflow.com/questions/1118198/how-can-you-figure-out-the-highest-z-index-in-your-document http://stackoverflow.com/questions/1118198/how-can-you-figur... They should just use that to find the highest z-index, then add 1. Totally future proof.