-
-
Save tinogomes/5099143 to your computer and use it in GitHub Desktop.
estudos CSS: float vs overflow
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
.container { | |
background: #CCC; | |
box-model: box-sizing; | |
} | |
#container-float { | |
float: left; | |
} | |
#container-overflow { | |
overflow: hidden; | |
} | |
#first { | |
background: red; | |
min-height: 100px; | |
} | |
#last { | |
background: yellow; | |
min-height: 250px; | |
} | |
.box { | |
float: left; | |
width: 200px | |
} |
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
<div class="container" id="container-overflow"> | |
<h1>container-overflow</h1> | |
<div class="box" id="first">lorem ipsum</div> | |
<div class="box" id="last">another</div> | |
</div> | |
<br> | |
<div class="container" id="container-float"> | |
<h1>container-float</h1> | |
<div class="box" id="first">lorem ipsum</div> | |
<div class="box" id="last">another</div> | |
</div> | |
<div style="clear:both;"> | |
lorem | |
</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