HTML CSS examples for CSS Layout:2 Column
Vertically Center Two Side-By-Side Text Columns of Different Heights
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html,<!--from w w w .j a v a 2 s. com--> body { min-height: 100%; height: 100%; margin: 0; padding: 0; } .containbox { display: table; width: 100%; height: 100%; } .leftbox, .rightbox { width: 50%; display: table-cell; vertical-align: middle; width: 50%; text-align: center; padding: 2%; } .rightbox { border-left: 1px solid blue; } </style> </head> <body> <div class="containbox"> <div class="leftbox"> Some Text Long </div> <div class="rightbox"> Some other long text </div> </div> </body> </html>