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 3 of 3

Thread: Netscape layers

  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Netscape layers

    Can someone remind me how to acess div's or span's as layers in NS 4? Do you just set the position style to absolute or relative or what?

    -boggly

  • #2
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    must have an id and position absolute:

    <div id="lyr" style="position:absolute;left:10;top:10">
    some content
    </div>

    Then it can be referenced as: document.layers['lyr']

    and the style attibutes are referenced as:

    document.layers['lyr].left
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    self.location
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    "must have an id and position absolute: "

    Well you can set position:relative, and it'll be treated as an ilayer.

    ID is optional too, but then you have to access the layers via its index in the layers array document.layers[x], where x is the index beginning with zero.


  •  

    Posting Permissions

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