css - responsive 2 column 2 row layout -


i have been trying figure out how create layout, have 2 column layout left column having 1 row , right side having 2. im trying adjust fluidly. im having trouble top of top image on right align top of left image while bottom of bottom image stays aligned bottom of left image. should use table?

here have far.. not close appreciate help.

http://jsfiddle.net/#&togetherjs=tpsepthkit

here image of acomplish enter image description here

the closest come table single row , 2 cells (so both sides equal in height).

then on right have 2 divs heights adding 100% (say, 60% top , 40% bottom).

we'll specify vertical-align: top upper block, , vertical-align: bottom lower one. on top produce desired effect, on bottom vertical align doesn't kick in because have 1 element align. fix this, need spanner element 100% height , place adjacent "real" block.

here, .block represent content inside cell, e.g. image , caption.

jsfiddle

html

<table class="container">     <tr>         <td class="left">         </td>         <td class="right">             <div class="top">                 <div class="block"></div>             </div>             <div class="bottom">                 <div class="filler"></div><div class="block"></div>             </div>         </td>     </tr> </table> 

css

.container {     width: 100%;     height: 100%; } .left {     width: 60%;     height: 200px; } .right {     height: 100%; } .right .top {     height: 60%;     width: 100%;     vertical-align: top; } .right .bottom {     height: 40%;     width: 100%;     vertical-align: bottom; } .block {     display: inline-block; } .filler {     height: 100%;     display: inline-block; } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -