In order for a div to expand vertically to fit content
do not specify a height for it.
There may also be problems if you have floats in the div. Floats have no height therefor an enclosing div won't see the height of the float.
What will work is to place a clear property at the base of the enclosing div if possible. A la
Code:
<div class="content">
<div style="float: left;">
stuff here
</div>
More stuff here
<div style="clear: both;"></div>
</div>