# CSS: div height

**URL:** <https://forum.kirupa.com/t/css-div-height/145375>\
**Category:** Uncategorized\
**Created:** [April 21, 2005, 10:56pm UTC](https://forum.kirupa.com/t/css-div-height/145375 "2005-04-21T22:56:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zrowfighter](https://avatars.discourse-cdn.com/v4/letter/z/8797f3/32.png) [@zrowfighter](https://forum.kirupa.com/u/zrowfighter)\
**Post date:** [April 21, 2005, 10:56pm UTC](https://forum.kirupa.com/t/css-div-height/145375/1 "2005-04-21T22:56:16Z")

</div>

\<div class=“style1” id=“div1”\>  
!!! dynamic text set by PHP !!!  
\</div\>

Using the code above…  
In javascript, I’m trying to determine height of the div. Since the text in the div can change in length, I want to beable to move another object below it so it doesn’t get over run by overflowed text.

I guess what I’m asking is:

1. how do I detect Overflow
2. if overflow, what is the height(in pixels) of the enclosing div because of overflow.

Thanks!
