Skip to content

Instantly share code, notes, and snippets.

@rtircher
Created May 30, 2013 13:03
Show Gist options
  • Select an option

  • Save rtircher/5677664 to your computer and use it in GitHub Desktop.

Select an option

Save rtircher/5677664 to your computer and use it in GitHub Desktop.
Ensure float elements indicate their size to the parent div. Add the clearfix class to the parent div
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix {display: inline-block;}
/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment