Created
May 23, 2013 12:17
-
-
Save revolunet/5635652 to your computer and use it in GitHub Desktop.
absolute positionned children
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
| /** | |
| * absolute positionned children | |
| */ | |
| .d1 { | |
| top:60px; | |
| width:30%; | |
| height:0; | |
| background:pink; | |
| vertical-align:bottom; | |
| display: inline-block; | |
| position: relative; | |
| } | |
| .d2 { | |
| width:100%; | |
| padding:5px; | |
| background:yellow; | |
| position:absolute; | |
| bottom:0px; | |
| height:50px; | |
| } |
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
| <!-- content to be placed inside <body>…</body> --> | |
| <div class="d1"> | |
| <div class="d2"> | |
| as an absolute positionned children, this element is still visible even when parent has height=0; | |
| </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":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment