Skip to content

Instantly share code, notes, and snippets.

@prestontimmons
Created January 12, 2011 15:26
Show Gist options
  • Save prestontimmons/776293 to your computer and use it in GitHub Desktop.
Save prestontimmons/776293 to your computer and use it in GitHub Desktop.
clearfix.css
/* -----------------------
clearfix
from http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack/
*/
.group:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.group { display: inline-block; }
/* start commented backslash hack \*/
* html .group { height: 1%; }
* .group { display: block; }
*/* close commented backslash hack */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment