HTML CSS examples for CSS Layout:Column Layout
100% Header and single column layout
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body,html { width: 100%; height:100%; margin: 0; padding: 0; } #header {<!-- w ww . java 2s.c o m--> height:70px; width:100%; background-color:red; position: relative; z-index: 10; } #container { width:600px; background-color:gray; min-height: 100%; margin:0 auto; margin-top: -70px; padding-top: 70px; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; } </style> </head> <body> <div id="header"> This is the Header </div> <div id="container"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Unde repudiandae iste expedita nesciunt eum tempora eius animi nostrum fugit aspernatur aliquam reprehenderit excepturi maxime eaque consequatur at officia similique totam! </div> </body> </html>