[[Javascript]] width and height of an element [solved]

Bernu Bernard bernu at lptmc.jussieu.fr
Sun Sep 24 13:13:38 CDT 2006


Thank you Matt,
This are very good links. I finally found what I was looking for  
since a long time.
I'm on MacOSX and tested IE (5.2.3) , Safari (2.04) , Opera  
(9.0.1)  , Firefox (1.5.0.7) , Camino (1.0.3),

All work with
elem.clientHeight

PS : the on line lib is false for Safari (it says e.innerHeight  
should work for Safari, but it does not - at least on version 2)

Le Sep 24, 2006 à 6:46 PM, Matt Warden a écrit :

> On 9/24/06, Bernu Bernard <bernu at lptmc.jussieu.fr> wrote:
>> Hi list,
>>
>> How can I find the width and size of an element ?
>>
>> Say for example I have :
>>
>> <div id="test" onclick="getsizes()">hello</div>
>>
>> When I click on "hello" I'd like to get the width and height of this
>> element.
>
> http://developer.yahoo.com/yui/docs/dom/YAHOO.util.Dom.html#getRegion
> http://developer.yahoo.com/yui/docs/dom/YAHOO.util.Region.html#bottom
>
> -- 
> Matt Warden
> Cleveland, OH, USA
> http://mattwarden.com
>
>
> This email proudly and graciously contributes to entropy.
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list