Created
February 23, 2012 19:26
-
-
Save SelenIT/1894507 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,128,.3);} | |
span { | |
float: left; | |
background: rgba(255,255,192,.8); | |
color: green; | |
width: 90px; | |
height: 80px; | |
border: 1px solid #ccc; | |
margin: -1px 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 в непустом блоке 1</span>Первый абзац</p> | |
<p style="margin-bottom:100px"><span>Float из пустого блока 2</span></p> | |
<p><span>Float в непустом блоке 3</span>Третий абзац</p> | |
</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":"separate","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment