View Full Version : Netscape layers
boggly
11-03-2002, 01:56 AM
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
COBOLdinosaur
11-03-2002, 06:03 PM
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
realisis
11-03-2002, 10:45 PM
"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.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.