Created
July 30, 2013 10:47
-
-
Save tspringborg/6111958 to your computer and use it in GitHub Desktop.
Although elements like <div>s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: if floated elements have non-floated parent elements, the parent will collapse.
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
.content:after{ | |
content: " "; | |
display: block; | |
height: 0; | |
clear: both; | |
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML += '<div class="ie7-clear"></div>' ); | |
} | |
.ie7-clear { | |
display: block; | |
clear: both; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment