Skip to content

Instantly share code, notes, and snippets.

@ioseb
Created December 29, 2009 14:10
Show Gist options
  • Save ioseb/265328 to your computer and use it in GitHub Desktop.
Save ioseb/265328 to your computer and use it in GitHub Desktop.
cross browser CSS clearfix
/** Clearfix */
.clearfix:after {
clear: both;
content: ".";
display: block;
height: 0;
line-height: 0;
visibility: hidden;
}
.clearfix {
display: inline-block;
}
html[xmlns] .clearfix {
display: block;
}
* html .clearfix {
height: 1%;
}
/** End Clearfix */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment