Skip to content

Instantly share code, notes, and snippets.

@Gaya
Last active January 4, 2016 03:09
Show Gist options
  • Save Gaya/8560275 to your computer and use it in GitHub Desktop.
Save Gaya/8560275 to your computer and use it in GitHub Desktop.
Fills container height containing floating elements without setting `overflow: hidden`.
.container:after {
content: "";
clear: both;
display: table;
}
//or as a mixin
@mixin clearfix {
&:after {
content: "";
clear: both;
display: table;
}
}
//usage:
.container {
@include clearfix;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment