Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Dec 2003
    Location
    America
    Posts
    544
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is there a limit to the z-index?

    I was sort of wondering if there was a limit the z-index property. And if so, is there a trick of over-comming this limitation?
    LovesWar

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I do not believe so -- I've only gone up to 99 to test it, but you should be able to go even farther... but I wouldn't see why you'd need 99 or more levels unless you were playing around.
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...

  • #3
    Regular Coder
    Join Date
    Dec 2003
    Location
    America
    Posts
    544
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I asked because i thought i read somewhere that the z-index property went as high as 26. How then would i go beyond 26? Do i simply continue to go onto the next number, like 27, 28, and so on, and on?
    LovesWar

  • #4
    Regular Coder ArcticFox's Avatar
    Join Date
    Jan 2004
    Location
    Vostok Station, AQ
    Posts
    602
    Thanks
    35
    Thanked 3 Times in 3 Posts

    Post

    When I test elements with z-indexes, I usually go by tens, 10, 20, 30, 40...150, 160, etc. That way I could add other things in between if needed.

    Never had a problem.
    <div> - putting your mind in a box since 1997

  • #5
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    z-index is unlimited.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Deck of cards?

    On a whole other matter: if you find yourself needing more than 26 z-index levels, bells should start to ring, horns should toot, warning lights should flash...

    As Liorean already stated, as far as I know there's no real limit to the value for z-index; I've seen values like 100, 200, 300, 400... The number of actually stacked levels though is a whole different story and probably depends on what a particular browser can cope with.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just to avoid possible browser bugs I would limit the z-index to +/-32767 which really ought to be big enough to handle just about anything.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #8
    Regular Coder ArcticFox's Avatar
    Join Date
    Jan 2004
    Location
    Vostok Station, AQ
    Posts
    602
    Thanks
    35
    Thanked 3 Times in 3 Posts

    Cool

    I agree, keep your z-index numbers between 0 and 32thousand and you should be alright.
    <div> - putting your mind in a box since 1997


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •