Skip to content

Instantly share code, notes, and snippets.

@joachimdoerr
Created November 19, 2011 15:06
Show Gist options
  • Save joachimdoerr/1378930 to your computer and use it in GitHub Desktop.
Save joachimdoerr/1378930 to your computer and use it in GitHub Desktop.
micro clearfix methode
// ----------------------------------------------------- ~ css syntax
.cf:before, /* for modern browsers */
.cf:after {
content:"";
display:table;
}
.cf:after {
clear:both;
}
.cf { /* for IE6,7 */
zoom:1;
}
// ----------------------------------------------------- ~ less syntax
.cf () {
*zoom: 1; // for IE6,7
&:before, // for modern browsers
&:after {
content: "";
display: table;
}
&:after {
clear: both;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment