scriptygoddess

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.

See example here.

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)

See fixed example here.

Related posts:

  1. swfobject – flash doesn't load in Firefox Ran into a bizarre problem today using swfobject. A lot...

Related posts brought to you by Yet Another Related Posts Plugin.

No Responses to "Floated boxes extending outside of container box"

Comment Form

Featured Sponsors

About


Advertisements