views:

1814

answers:

2

I couldn't find that in the specs. I am using lot of of 3rd party javascript and want to make sure that certain piece appears on top of everything else.

+3  A: 

From the CSS 2.1 Specification:

4.3.1 Integers and real numbers

Some value types may have integer values (denoted by ) or real number values (denoted by ). Real numbers and integers are specified in decimal notation only. An consists of one or more digits "0" to "9". A can either be an , or it can be zero or more digits followed by a dot (.) followed by one or more digits. Both integers and real numbers may be preceded by a "-" or "+" to indicate the sign. -0 is equivalent to 0 and is not a negative number.

Note that many properties that allow an integer or real number as a value actually restrict the value to some range, often to a non-negative value.

So the specification does not limit the range. I guess that 2^31 - 1 (signed 32-bit integer) is the limit in most implementations.

DrJokepu
Some older implementations set the limit at much lower arbitrary values. I think I specifically remember FF 1 having issues if you tried to set z-indices higher than 10000.
John Feminella
+2  A: 

The zIndex for an object can be as high as you want it to be(obviously obeying the signed int limit). But if you want to check if there is any other object on the page higher that what you will set dynamically, you can check this out.

renegadeMind