Skip to content

Instantly share code, notes, and snippets.

@spikensbror
Created May 6, 2012 17:06
Show Gist options
  • Save spikensbror/2623322 to your computer and use it in GitHub Desktop.
Save spikensbror/2623322 to your computer and use it in GitHub Desktop.
Easy non-html clearfix.
/* float clearing for IE6 */
* html .clearfix{
height: 1%;
overflow: visible;
}
/* float clearing for IE7 */
*+html .clearfix{
min-height: 1%;
}
/* float clearing for everyone else */
.clearfix:after{
clear: both;
content: ".";
display: block;
height: 0;
visibility: hidden;
font-size: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment