Skip to content

Instantly share code, notes, and snippets.

@jamischarles
Created October 10, 2012 20:01
Show Gist options
  • Save jamischarles/3868054 to your computer and use it in GitHub Desktop.
Save jamischarles/3868054 to your computer and use it in GitHub Desktop.
Modern clearfix
/* (taken from bootstrap github conversation) */
/* Utility classes */
/* Clearfix */
/* Clearfix for modern browsers */
.cf:before,
.cf:after {
content: "";
display: table;
}
.cf:after {
clear: both;
}
/* Clear fix for IE 6/7 (trigger has layout) */
.cf {
zoom: 1;
}
/* Not clearfix, but extremely useful */
.hidden {
display: none;
}
.fl { float: left;}
.fr { float: right; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment