Welcome to WebmasterWorld Guest from 18.208.187.169

Forum Moderators: open

Message Too Old, No Replies

How to detect the width of an element?

     
9:21 pm on Dec 4, 2003 (gmt 0)

New User

10+ Year Member

joined:Nov 3, 2003
posts:12
votes: 0


How do I determine the width of an element (such as DIV or A) on a page using Javascript?
2:02 am on Dec 5, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 27, 2002
posts:125
votes: 0


use a search engine ;) or

getElementById("TagID").style.width

10:40 pm on Dec 8, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:June 13, 2003
posts:44
votes: 0


Do a search on offsetWidth as well.