HTML CSS examples for CSS Widget:Header
Set Content area height to 100% including header
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html,body{height:100%;margin:0px;} #header{height:80px;background:black;} #mainView{height:100%; background:red;} #header {<!-- w w w.j ava2s. co m--> height:80px; background:black; position: absolute; top: 0; left: 0; width: 100%; } #mainView { height:100%; background:red; padding-top: 80px; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; } </style> </head> <body> <div id="header"> --Header </div> <div id="mainView"> --Main </div> </body> </html>