Created
January 28, 2012 23:30
-
-
Save plindberg/1696254 to your computer and use it in GitHub Desktop.
display: table-cell and maximum height
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
| /* display: table-cell and maximum height */ | |
| body {margin-top: 50px;} | |
| .block { | |
| width: 100%; | |
| display: table; | |
| } | |
| .left, .right { | |
| display: table-cell; | |
| outline: 1px solid rgb(255, 218, 237); | |
| } | |
| .left { | |
| width: auto; | |
| } | |
| .right { | |
| width: 320px; | |
| } | |
| .leftinner { | |
| height: 200px; | |
| } | |
| .rightinner { | |
| margin-left: 10px; | |
| padding-left: 10px; | |
| border-left: 1px dashed blue; | |
| } | |
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=block> | |
| <div class=left><div class=leftinner>variable height (from content)</div></div> | |
| <div class=right><div class=rightinner>should expand to full height</div></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":"split","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment