Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS - max z-index value [duplicate]

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!

like image 677
Web_Designer Avatar asked Dec 19 '11 18:12

Web_Designer


People also ask

What is the maximum z-Index CSS?

The maximum range is ±2147483647. In CSS code bases, you'll often see z-index values of 999, 9999 or 99999. This is a perhaps lazy way to ensure that the element is always on top. It can lead to problems down the road when multiple elements need to be on top.

What is z-Index 1000 in CSS?

z-index defines which positioned element appears on top (Sort of like layers). So z-index: 1000 would appear on top of a z-index 999 . Doing z-index: 1001 is an an attempt to appear "on top" of a item with z-index: 1000.

What does z-Index 9999 mean?

CSS z-index property always work with absolute as well as relative positioning value. CSS z-index possible value 0, positive (1 to 9999) and negative (-1 to -9999) value to set an element. Properties. Value.


1 Answers

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.

like image 104
Netizen110 Avatar answered Sep 23 '22 15:09

Netizen110