CSS - max z-index value

CssBrowserCross BrowserZ Index

Css Problem Overview


Is there a maximum / minimum possible value for the CSS z-index property?
Do different browsers have different maximum / minimum accepted values?
How will browsers handle a high / low value?

I thought I read somewhere once about a max z-index value. Maybe I'm wrong.
Thanks in advance!

Css Solutions


Solution 1 - Css

These are the max values.

Browser	     Max z-index value 	When exceeded, value changes to:
Internet Explorer 6	2147483647	2147483647
Internet Explorer 7	2147483647	2147483647
Internet Explorer 8	2147483647	2147483647
Firefox 2	        2147483647	element disappears
Firefox 3	        2147483647	0
Safari 3	        16777271	16777271
Safari 4	        2147483647	2147483647
Chrome 29           2147483647	2147483647
Opera 9	            2147483647	2147483647

Found it somewhere on the web.

Solution 2 - Css

Incredibly, this is the chrome's max z-index value.

.css('z-index', '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999').css('z-index')

If you add one more digit it will go to 1e+308

Solution 3 - Css

Found some newer information from 2012:

"Chrome, Opera and IE9 seem to be the only browsers supporting a true infinite value for the z-index, while Firefox is still using 2147483647 and Safari now engages in some strange rounding off behavior after a number exceeds 16 digits in length."

Here is the source: World War Z-index

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionWeb_DesignerView Question on Stackoverflow
Solution 1 - CssNetizen110View Answer on Stackoverflow
Solution 2 - CssNetizen110View Answer on Stackoverflow
Solution 3 - CssAlex VangView Answer on Stackoverflow