-
-
Save SelenIT/1903534 to your computer and use it in GitHub Desktop.
CSS2.1 8.3.1 Collapsing margins
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
/** | |
* CSS2.1 8.3.1 Collapsing margins | |
*/ | |
div { margin: 50px; background: #000; color: #fff; } | |
p { margin: 80px 0; background: rgba(128,255,192,.2); } | |
span { | |
float: left; | |
background: rgba(255,255,127,.8); | |
color: green; | |
width: 90px; | |
height: 90px; | |
margin: 0 2px; | |
box-shadow: 0 0 1px rgba(255,255,192,.8); | |
} | |
.clear { clear: left; } |
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
<div> | |
<p><span>Float в непустом блоке</span>Первый див</p> | |
<p><span>Float из пустого блока 1</span></p> | |
<p class="cflear"><span>Float из блока 2 (с клиренсом)</span></p> | |
<p><span>Float из пустого блока 3</span></p> | |
<p><span>Float из пустого блока 4</span></p> | |
</div> | |
<div>Второй див</div> |
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
{"view":"split","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment