aleclarson
aleclarson

Reputation: 19035

Getting the height of an absolute div

I'm trying to get the height of an absolute div, but am running into a problem. jQuery's .height() doesn't retrieve the correct hei

Thanks for any help!

Upvotes: 0

Views: 654

Answers (2)

yvonnezoe
yvonnezoe

Reputation: 7407

Is this what you want? http://jsfiddle.net/Y9Upp/7/ your selector should be #box instead of #boxheight ;)

Upvotes: 0

elclanrs
elclanrs

Reputation: 94101

You're grabbing the wrong element...

$('#boxHeight div').first().html($('#box').height());
                                 ----^----

http://jsfiddle.net/Y9Upp/6/

Upvotes: 1

Related Questions