20 Jan, 2007
Floated boxes extending outside of container box
Posted by: Jennifer In: Bookmarks|CSS|CSS related
Ran into this problem today: Had a container div with floated divs inside. However the container div was shrinking up above the bottom of the floated divs inside.
Found this solution which basically suggested adding the following so that it wouldn't do that:
.containerdiv:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
As well as adding a height: 1% (to to the container div)