HTML CSS examples for CSS Layout:Layout
CSS Layout to control div height
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html, body { height:100%; } #wrapper {<!-- w ww. j a v a 2s . com--> width:801px; background-color:Chartreuse; margin:0 auto; background-color:yellow; } #header { width:100%; height:100px; background-color:blue; } #global_nav { width:100%; height:41px; background-color:pink; } #content { width:100%; height:100%; display:table; } .local_nav { width:201px; display:table; float:left; background-color:OrangeRed; height:100%; } .main { width:581px; float:right; background-color:grey; height:100%; } #footer { background-color:BlueViolet; width:100%; height:81px; } </style> </head> <body> <div id="wrapper"> <div id="header"> Lorem ip </div> <div id="global_nav"> Lorem ipsum dolo </div> <div id="content"> <div class="local_nav"> Lorem ipsu <br>Lorem ipsu <br>Lorem ipsu <br>Lorem ipsu <br>Lorem ipsu <br>Lorem ipsu <br>Lorem ipsu <br> </div> <div class="main"> Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br>Lorem ipsum do <br> </div> </div> <div id="footer"> Lorem ip </div> </div> </body> </html>