Skip to content

Instantly share code, notes, and snippets.

@jshcrowthe
Created July 9, 2015 15:09
Show Gist options
  • Save jshcrowthe/a2a68d69ca6308588160 to your computer and use it in GitHub Desktop.
Save jshcrowthe/a2a68d69ca6308588160 to your computer and use it in GitHub Desktop.
CSS Clearfix
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment