HTML CSS examples for CSS Widget:Header
Fix header to top of page with horizontal scroll
<html> <head> <style> body { background: #aaa; } .hdr { overflow: auto; position: fixed; left: 0; right: 0; top: 0; height: 90px; } .content { margin-top: 120px; } </style> </head> <!--from w ww . j a v a 2 s . c o m--> <body> <div class="hdr"> this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test </div> <div class="content"> 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> </div> </body> </html>