Skip to content

Instantly share code, notes, and snippets.

@s-hiroshi
Created January 25, 2013 14:37
Show Gist options
  • Save s-hiroshi/4634889 to your computer and use it in GitHub Desktop.
Save s-hiroshi/4634889 to your computer and use it in GitHub Desktop.
CSS > clearfix
/* -------------------------------------------------------------------
Clearfix
------------------------------------------------------------------- */
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {
display: inline-table;
min-height: 1%;
}
/* Hides from -mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from -mac */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment