Created
February 4, 2013 14:22
-
-
Save maxhoffmann/4706966 to your computer and use it in GitHub Desktop.
Micro Clearfix IE8+
This file contains hidden or 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
| /** | |
| * Micro Clearfix IE8+ | |
| */ | |
| .bg { | |
| background: red; | |
| } | |
| .cf:after{ | |
| content: ""; | |
| display: table; | |
| clear: both; | |
| } | |
| .cf2 { | |
| overflow: auto; | |
| } | |
| .left { | |
| float: left; | |
| height: 100px; | |
| } | |
| .right { | |
| float: right; | |
| height: 100px; | |
| } | |
| html { | |
| font-family: sans-serif; | |
| } |
This file contains hidden or 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
| <h2>After</h2> | |
| <div class="bg cf"> | |
| <div class="left"></div> | |
| <div class="right"></div> | |
| </div> | |
| <h2>Overflow</h2> | |
| <div class="bg cf2"> | |
| <div class="left"></div> | |
| <div class="right"></div> | |
| </div> |
This file contains hidden or 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
| // alert('Hello world!'); |
This file contains hidden or 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
| {"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment