Skip to content

Instantly share code, notes, and snippets.

@amaxwell01
Created September 20, 2012 20:26
Show Gist options
  • Save amaxwell01/3758150 to your computer and use it in GitHub Desktop.
Save amaxwell01/3758150 to your computer and use it in GitHub Desktop.
Clearing floats and fixing overflow issues. Clearfix
// SASS CODE
.clearfix {
*zoom: 1;
&:before,
&:after {
content: "";
display: table;
line-height: 0;
}
&:after {
clear: both;
}
}
// CSS ONLY CODE BELOW
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after
{
content: "";
display: table;
line-height: 0;
}
.clearfix:after {
clear: both;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment