Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Getting height of a div?

4:46 pm on Apr 23, 2007 (gmt 0)

New User

10+ Year Member

joined:Mar 12, 2007
votes: 0

Is there any way to get the current height of a div element?
5:11 pm on Apr 23, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 29, 2007
votes: 0

Use offsetHeight/width as follows:

var div = document.getElementById( "mydiv");

var height = div.offsetHeight;
var width = div.offsetWidth;


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members