I have had this problem for a long time when working with HTML/CSS and Floats.
In the image you can see I have a Box Div that is Floated left as there is many of these B
Try applying overflow:auto to the container, the one whose height you want to resize based on the height of its contents (the floated items).
overflow:auto
I'd add a jsfiddle link but it's not been working at all for me recently. :/