SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi All,

    Quick question for you guys. Does anybody know the maximum number of layers allowed in a <DIV> tag? Thaks in advance.
    Jason M. DesRoches
    Big Resources Network
    jason@123webmaster.com
    http://www.bigresources.com

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If there is such a limit, it would be browser-dependant. Are you really planning a design that will take so many layers that this will be a concern?
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  3. #3
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope, I have an ad box on a home page service that is being defeated by someone placing a layer just 1 higher than mine. I don't want to play a game, or have a box that can be defeated, so I'd like to set it at the maximum number of layers possible.
    Jason M. DesRoches
    Big Resources Network
    jason@123webmaster.com
    http://www.bigresources.com

  4. #4
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You want to set the Z-Index property of your layer to the maximum integer value available in JavaScript. This value is available as Number.MAX_VALUE. Thus, if you set your layer's z-index to Number.MAX_VALUE, you should be able to create a layer that can't be superceeded.

    Of course, someone creative could always change your layer's z-index using JavaScript...
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  5. #5
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Setting the Z-Index to 100 seems to win for now, however Number.MAX_VALUE wasn't working. Does this make any sense?
    Jason M. DesRoches
    Big Resources Network
    jason@123webmaster.com
    http://www.bigresources.com

  6. #6
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    How was it not working?
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  7. #7
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My box using the div did appear above his div layer, however it appeared below normal items on the page such as text and graphics.
    Jason M. DesRoches
    Big Resources Network
    jason@123webmaster.com
    http://www.bigresources.com


Bookmarks

Posting Permissions

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