Created
September 22, 2012 20:53
-
-
Save jklm313/3767802 to your computer and use it in GitHub Desktop.
Untitled
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
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; /* paulirish.com/2012/box-sizing-border-box-ftw/ */ | |
| position: relative; | |
| } | |
| html, body { | |
| height: 100%; | |
| } | |
| #parent { | |
| width:300px; | |
| height:300px; | |
| background-color:#ccc; | |
| text-align: center; | |
| } | |
| #parent:before { | |
| content: ''; | |
| display: inline-block; | |
| height: 100%; | |
| margin-right: -4px; | |
| vertical-align: bottom; /* works without */ | |
| } | |
| .child { | |
| display: inline-block; | |
| vertical-align: bottom; | |
| height:100px; | |
| width:30px; | |
| background-color:#999; | |
| } | |
| .one { | |
| height: 200px; | |
| } | |
| .two { | |
| height: 300px; | |
| } | |
| .three { | |
| height: 100px; | |
| } | |
| .four { | |
| height: 210px; | |
| } |
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 id="parent"> | |
| <div class="child one">d</div> | |
| <div class="child two">f</div> | |
| <div class="child three">g</div> | |
| <div class="child four">h</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
| {"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