Rahul Utb
Rahul Utb

Reputation: 489

determining the height of an element

After setting the height of some element (say a div) to auto, still can I get the height of this div in pixel or may be in some other units

Upvotes: 2

Views: 1026

Answers (1)

Russell Dias
Russell Dias

Reputation: 73292

You can use element.clientHeight or element.offsetHeight.

Or if jQuery is a choice, something like:

$("#element").height();

Upvotes: 4

Related Questions