Forum Moderators: not2easy
I have a bunch of divs floated in a parent div. The parent div, containing only these floats, collapses and doesn't visually surround the floated divs anymore. Is there a way to prevent this?
The HTML is roughly:
<div id="container">
<div class="box"> x </div>
<div class="box"> y </div>
...
</div>
With CSS of:
#container {
border: 3px black solid;
padding: 20px;
}
.box {
float: left;
width: 20%;
}