Created
January 5, 2014 11:11
-
-
Save adikahorvath/8266965 to your computer and use it in GitHub Desktop.
CSS clear types
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
/* 1 */ | |
.clear { | |
clear: both; | |
font: 0/0 a; | |
height: 0; | |
visibility: hidden; | |
} | |
/* 2 */ | |
.clear:before, | |
.clear:after { | |
clear: both; | |
content: " "; | |
display: table; | |
} | |
/* 3 */ | |
.clear { 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
<!-- 1 --> | |
<div style="float:left;width:50%"></div> | |
<div style="float:left;width:50%"></div> | |
<div class="clear"></div> | |
<!-- 2 --> | |
<div class="clear"> | |
<div style="float:left;width:50%"></div> | |
<div style="float:left;width:50%"></div> | |
</div> | |
<!-- 3 --> | |
<div class="clear"> | |
<div style="float:left;width:50%"></div> | |
<div style="float:left;width:50%"></div> | |
</div> | |
<!-- obsolete --> | |
<div style="float:left;width:50%"></div> | |
<div style="float:left;width:50%"></div> | |
<br clear="all" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment