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:
Any suggestions on what I am doing wrong?
document.getElementById('layerHeader').style.left = document.getElementById('centerCol').style.left;
Thanks in advance, ben
can u not use same variable
you use a variable to place the first? can't you use that?