HTML CSS examples for CSS Layout:Fixed Position
Add fixed positioned header to page
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #header {<!-- w ww . java2 s . co m--> left:0px; top:0px; width:100%; height:31px; background-color:Chartreuse; z-index:2; overflow:hidden; min-width:281px; position:fixed; } </style> </head> <body> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> <div id="header"></div> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> blah <br> </body> </html>