Click to See Complete Forum and Search --> : Layer positioning


Rik Comery
03-24-2003, 07:52 AM
This may be a simple one, but i am pretty new to this.

If i place a layer in a table cell, and set the position as relative, is there a way i can reference the left position of that layer.

I am trying document.all['layer1'].style.left, but if i place this in an alert, the alert box is empty. I have tried putting style="left:50" in the layer, and this returns a value in the alert, but it also re-positions the layer.

khalidali63
03-24-2003, 08:02 AM
That is because you are getting layer positioned with reference to the parent element.I don't think unless you explicitly set a CSS property you can access it at the run time.

You might want to get the parent element.ofsetLeft property or may be the layer itself offsetLeft...

Cheers

Khalid