Skip to content

Instantly share code, notes, and snippets.

@mahdilacki
Created April 19, 2012 05:11
Show Gist options
  • Select an option

  • Save mahdilacki/2418753 to your computer and use it in GitHub Desktop.

Select an option

Save mahdilacki/2418753 to your computer and use it in GitHub Desktop.
A new micro clearfix hack
/* Start of "Micro clearfix" */
/* For modern browsers */
.cf:before,
.cf:after {
content:"";
display:table;
}
.cf:after {
clear:both;
}
/* For IE 6/7 (trigger hasLayout) */
.cf {
zoom:1;
}
/* End of "Micro clearfix" */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment