|
I am trying to set a table cell height by setting a div inside it.
Thus, I want to set the div height to the overall height I desire the cell to be.
Alas, browsers include padding and borders in the offsetHeight property,but NOT margins. I need to get that to calculate properly.
Unfortunately, I can't seem to read the element.style.margin value in any possible combination. (I can get borders and padding by subtracting style.height from offsetheight)
I have tried style.marginLeft, and all permutations. I am searched the web can cannot find any reference to reading this attribute.
But surely it must be attainable. Can anyone solve this?
You would think it would simply be
val = parseInt(element.style.marginWidth,10);
but it's not.
(The parseInt() func just strips the px text from the value. eg. "100px"
|
|
|
|
|
|
|
|