• Advertisement
Sign in to follow this  

[web] Dynamic Div Height

This topic is 4453 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello is it possible to get a div height when it isnt specified. style.height style.pixelHeight etc... All the height properties depending on the browsers only give you the height if you specified in the div tag what the height is. But for my script I want a certain action to happen and the movement will very depending on the div that contains the aherf tag. Now retriveing the height if I specify isnt a problem but getting the height with out specifying is.

Share this post


Link to post
Share on other sites
Advertisement
Non-standard, but it works on all mainstream browsers:

document.getElementById('div-id').offsetHeight

Share this post


Link to post
Share on other sites
http://freewebs.com/supaflyfrank/

I thought that was going to work before but if you roll over the first hey friend box and moveout of it it shoulds that the div offsetHeight is undefined. And it is undefined on Firefox IE Netscape and Opera

Share this post


Link to post
Share on other sites
Read konForce's post again. Don't use document.getElementById("one").style.offsetHeight, use document.getElementById("one").offsetHeight

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement