3

I'm working on a widget to be used in other sites.

Is there any possible way to find the max z-index for the elements that are used in other sites via javascript?

Or how should I set my widget on top of all other elements using Z-index or other means.

Found that the max z-index value is 2147483647. Is it possible to override the max value?

Prem Anand
  • 1,496
  • 2
  • 12
  • 30
  • 2
    2147483647 is the max value of a 32 bit integer so no, you won't be able to override that. – DoctorMick Dec 12 '14 at 15:21
  • Please don't use that value ... you can use a value like `1000` and make a note to the person who use the widget to handle that. If you set the max value you can mess up elements like modals - fancybox – DaniP Dec 12 '14 at 15:21
  • related: http://stackoverflow.com/questions/1118198/how-can-you-figure-out-the-highest-z-index-in-your-document – SW4 Dec 12 '14 at 15:21

1 Answers1

0
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
Karmacoma
  • 658
  • 1
  • 13
  • 37