@fredmvDec 05.2003 — #It doesn't work most likely because you aren't referencing the correct property. It won't return a value for [font=courier]width[/font] if it isn't defined. The only way you can access it is using something like [url=http://www.csie.ntu.edu.tw/~b7506051/docs/GeckoDOM/examples7.html][font=courier]getComputedStyle[/font][/url].
@deleriousauthorDec 06.2003 — #OK thanks for the replies, everyone. The reason why the document.getElementByID("mydiv").style.width code didn't work is because I am not fixing the width of my DIV. But the getComputedStyle() works, and using offsetWidth also works.