Skip to content

Instantly share code, notes, and snippets.

@benvds
Created January 11, 2010 20:23
Show Gist options
  • Save benvds/274575 to your computer and use it in GitHub Desktop.
Save benvds/274575 to your computer and use it in GitHub Desktop.
/* as described on: http://perishablepress.com/press/2009/12/06/new-clearfix-hack/ */
/* new clearfix */
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment