[Javascript] Get HTML element size

Peter-Paul Koch pp.koch at gmail.com
Tue Mar 8 07:25:11 CST 2005


>   How do I get the width and the height of a element in my page ?
>        my_element = getElementById("mydiv");
>        alert (my_element.style.width)

my_element.offsetWidth / Height

-- 
-------------------------------------------------------------------
ppk, freelance web developer

Bug Report: Report bugs yourself, or comment on previously 
reported ones.
http://www.quirksmode.org/bugreports/
------------------------------------------------------------------



More information about the Javascript mailing list