Results 1 to 14 of 14
Nov 26, 2002, 01:20 #1
- Join Date
- Feb 2002
- 0 Post(s)
- 0 Thread(s)
How to set position of layer relative to a table cell??
I am trying to make a layer that mimics a particular cell in a table (please dont ask me why, its complicated). I have created the layer so that its dimensions exactly match the table cell in question. Now I want to create a function that sets the top and left position of the layer to exactly match the top and left position of the cell in question. I have already had a try myself, but for the life of me can't quite figure it out.
I tried giving the cell in question and 'id' tag (id="centerCol") and then referencing the left and top values of the object. See the following code:
document.getElementById('layerHeader').style.left = document.getElementById('centerCol').style.left;
Thanks in advance, benExperience is that thing which lets you know you've made the same mistake yet again.