Hi
I have a HTML div element that has CSS padding applied to it.
I am trying to retrieve the top and bottom padding values that are on this div.
I have tried the following JavaScript code to try to get the top padding, but it does not seem to work. (Also this code does not produce any errors.)
does anyone know what i am doing wrong, or know of a way to get the padding values of any given div.
thanks,
I have a HTML div element that has CSS padding applied to it.
I am trying to retrieve the top and bottom padding values that are on this div.
I have tried the following JavaScript code to try to get the top padding, but it does not seem to work. (Also this code does not produce any errors.)
Code:
var content_pTop = document.getElementById('my_div').style.paddingTop;
alert (content_pTop);
thanks,
Comment