It works as designed though, for this is a CSS problem. A float is removed from the normal flow of a page, so a container that has all of its contents floated results in there being nothing that keep the size of the container open.
This can be resolved by clearing the float, so that the container fully surrounds the floated content too.
The CSS forum is a good place to get further information about this if required.