Last active
November 11, 2015 21:42
-
-
Save jeffreysbrother/bbb95fc8c1f87dbd8950 to your computer and use it in GitHub Desktop.
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
/* | |
add the clearfix class to the parent element. | |
In my case, the border of a div was collapsing into a child button. This was caused by adding the "float": "left" rule to the button | |
(this occurs even when "clear": "right" is not added) | |
*/ | |
.clearfix:after { | |
content: ""; | |
display: table; | |
clear: both; | |
} | |
/********************************* | |
below is Nicolas Gallagher's micro clearfix hack | |
********************************/ | |
.clearfix:before, | |
.clearfix:after { | |
content: " "; | |
display: table; | |
} | |
.clearfix:after { | |
clear: both; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment