leftpeg
08-21-2006, 10:26 AM
I have a div whose width depends on the length of the longest string I put into it using innerHTML. so my div contents look like
a_string
a_longer_string
the_longest_string
short_string
I would like to get the width of this div. How can I do this?
document.getElementById("myDiv").style.width returns nothing.
Thanks.
a_string
a_longer_string
the_longest_string
short_string
I would like to get the width of this div. How can I do this?
document.getElementById("myDiv").style.width returns nothing.
Thanks.