Skip to content

Instantly share code, notes, and snippets.

@evandroeisinger
Last active December 14, 2015 15:39
Show Gist options
  • Save evandroeisinger/5109264 to your computer and use it in GitHub Desktop.
Save evandroeisinger/5109264 to your computer and use it in GitHub Desktop.
Clearfix: CSS float’s problem fix.
/* Solve CSS float problem */
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
clear: both;
content: " ";
display: block;
}
/* SASS Version: Solve CSS float problem */
.clearfix {
*zoom: 1;
&:before, &:after {
clear: both;
content: " ";
display: block;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment