HTML CSS examples for CSS Widget:Header
Header staying in place
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #header<!--from w w w. java 2s.co m--> { position:fixed; height:100px; background-color:#ccc; width:100%; top:0; left:0; } #content { margin-top:105px; height:800px; background-color:#666; } </style> </head> <body> <div id="header"> header </div> <div id="content"> content </div> </body> </html>