Created
November 8, 2012 10:25
-
-
Save thedaviddias/4037984 to your computer and use it in GitHub Desktop.
CSS: Clearfix floats (group)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.group:before, | |
.group:after { | |
content: ""; | |
display: table; | |
} | |
.group:after { | |
clear: both; | |
} | |
.group { | |
zoom: 1; /* For IE 6/7 (trigger hasLayout) */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"group" class name is nicer and more semantic (via Dan Cederholm). Content property doesn't even need the space, can be empty string (via Nicolas Gallagher). Without any text, font-size is un-needed (Chris Coyier).