Last active
January 4, 2016 03:09
-
-
Save Gaya/8560275 to your computer and use it in GitHub Desktop.
Fills container height containing floating elements without setting `overflow: hidden`.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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