CSS – Clearing Floats

CSS – Clearing floats

A common problem with float-based layouts is that the floats’ container doesn’t want to stretch up to accomodate the floats. If you want to add, say, a border around all floats (ie. a border around the container) you’ll have to command the browsers somehow to stretch up the container all the way.

A jump off of the previous post on using the CSS float property for web layouts. This article shows how to nicely get around the “container has no height” problem when all child elements are floated.

Friday, May 29th, 2009

No Comments For “CSS – Clearing Floats”

Leave A Comment

Name *
Email *
Website

Comment

* Name and email are required to comment. Your email will not be displayed.