Skip to content

Instantly share code, notes, and snippets.

@rblalock
Created October 26, 2010 04:44
Show Gist options
  • Save rblalock/646332 to your computer and use it in GitHub Desktop.
Save rblalock/646332 to your computer and use it in GitHub Desktop.
The all important clearfix
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}
.clearfix:after {
clear: both;
content: ' ';
display: block;
font-size: 0;
line-height: 0;
visibility: hidden;
width: 0;
height: 0;
}
* html .clearfix,
*:first-child+html .clearfix {
zoom: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment