Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
clearfix

4 Articles
{
,

}
Direct link to the article Clearfix: A Lesson in Web Development Evolution
clearfix floats history

Clearfix: A Lesson in Web Development Evolution

The web community has, for the most part, been a spectacularly open place. As such, a lot of the best development techniques happen right out in the open, on blogs and in forums, evolving as they’re passed around and improved. …

Jay Hoffmann on Jul 3, 2018
Direct link to the article The End of the Clearfix hack?
clearfix floats flow-root

The End of the Clearfix hack?

Rachel Andrew with a clear (get it?!) explanation of display: flow-root;, including demos comparing old and new techniques. Apparently the name is still a little bit still up in the air.

The whole point of it is getting …

Sarah Drasner on Jan 25, 2017
Direct link to the article The Clearfix: Force an Element To Self-Clear its Children
clearfix pseudo elements

The Clearfix: Force an Element To Self-Clear its Children

This will do you fine these days (IE 8 and up):

.group:after {
  content: "";
  display: table;
  clear: both;
}

Apply it to any parent element in which you need to clear the floats. For example:

<div class="group">
  <div class="is-floated"></div>
  
…
Chris Coyier on Aug 10, 2009 Updated on Aug 16, 2018
Direct link to the article All About Floats
clear clearfix float layout

All About Floats

Float is a CSS positioning property. To understand its purpose and origin, we can look to print design. In a print layout, images may be set into the page such that text wraps around them as needed. This is commonly and appropriately called "text wrap".
Chris Coyier on Jul 8, 2009 Updated on Mar 25, 2021

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top