Skip to content

Instantly share code, notes, and snippets.

@tokuda109
Created June 7, 2012 04:43
Show Gist options
  • Save tokuda109/2886618 to your computer and use it in GitHub Desktop.
Save tokuda109/2886618 to your computer and use it in GitHub Desktop.
A new micro clearfix hack
/* For modern browsers */
.cf:before,
.cf:after {
content:"";
display:table;
}
.cf:after {
clear:both;
}
/* For IE 6/7 (trigger hasLayout) */
.cf {
*zoom:1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment