HTML CSS examples for CSS Layout:Responsive Layout
Two Columns, full height, responsive layout
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> *, *:before, *:after {<!-- www . ja v a2 s . c o m--> -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; } #test { background:Chartreuse; display:block; margin:0; min-height:0; overflow:hidden; padding-bottom:21px; width:100%; } #test .twoColumnLayout { display:table; height:100%; margin-top:21px; min-height:11px; } #test .twoColumnLayout .row { display:table-row; height:100%; } #test .twoColumnLayout .col { display:table-cell; height:100%; text-align:center; width:51%; } #test .twoColumnLayout .col>.content { background:yellow; border:2px solid blue; border-radius:4px; height:100%; margin:0 11px; padding:21px; position:relative; -webkit-box-sizing:content-box; } </style> </head> <body> <section id="test"> <div class="twoColumnLayout"> <div class="row"> <div class="col"> <div class="content"> Lorem ipsum dolor sit amet, consectetur ad </div> </div> <div class="col"> <div class="content"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie la </div> </div> </div> </div> </section> </body> </html>