HTML CSS examples for CSS Layout:2 Column
Position header, side box and main box in two column layout
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body, html{ height: 100%; } .header {<!-- w w w. j av a 2 s .c om--> background-color: red; height:70px; } .container { height:100%; position: relative; } .sidebox { width: 30%; background-color: blue; color: black; bottom: 0; top: 0; position: absolute; } .content { background: yellow; left:30%; right: 0; bottom: 0; top: 0; position: absolute; } </style> </head> <body> <div class="header"> header </div> <div class="container"> <div class="sidebox"> sidebox </div> <div class="content"> content </div> </div> </body> </html>