It looks like you have a container that has a child that floats, that is why the parent div collapses.
<div id="parent" title="this collapses">
<div style="float:left" title="child div"></div>
</div>
I think your problem is that the parent collapses.
The solution would be one of the following
- float that parent div (where possible).
- add a style overflow:hidden or auto to the parent div.
- add a class of clearFix* to the parent div(see below).
- set a height (where possible).
*clearfix:
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.clearfix {
display: inline-block;
}
html[xmlns] .clearfix {
display: block;
}
* html .clearfix {
height: 1%;
}