HTML CSS examples for CSS Widget:Footer stick to bottom
Nav bar centered and sticky footer using css
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html, body { height:100 %; margin:0; padding:0; } .wrapper {<!-- w ww.j a v a 2 s . co m--> min-height:100%; height:100%; margin:0 auto; } header { height:81px; background-color:Chartreuse; } nav { background-color:yellow; overflow:auto; } nav ul { margin-top:11px; padding:.8em; position:relative; float:left; list-style:none; background:blue; background:pink; box-shadow:0 2px 0 OrangeRed, 0 3px 2px rgba(0,0,0,.9) inset; border-radius:.4em; } nav li { float:left; } nav a { float:left; padding:.9em 2.6em; text-decoration:none; color:grey; text-shadow:0 2px 0 BlueViolet; font:bold 2.2em/2; letter-spacing:2px; text-transform:uppercase; border-width:2px; border-style:solid; border-color:Chartreuse; background:yellow; background:linear-gradient(blue, pink); } nav a:hover, nav a:focus { outline:0; color:OrangeRed; text-shadow:0 2px 0 grey; background:BlueViolet; background:linear-gradient(Chartreuse, yellow); } nav a:active { box-shadow:0 0 3px 3px blue inset; } nav li:first-child a { border-left:0; border-radius:5px 0 0 5px; } nav li:last-child a { border-right:0; border-radius:0 5px 5px 0; } .content { margin:6px; background-color:pink; } footer { height:81px; width:100%; background-color:OrangeRed; position:fixed; bottom:0px; z-index:100000; } </style> </head> <body> <div class="wrapper"> <header> Lorem ipsum </header> <nav> <ul> <li> <a href="one.html" class="current">Lor</a> </li> <li> <a href="two.html">Lor</a> </li> <li> <a href="three.html">Lorem</a> </li> <li> <a href="four.html">Lore</a> </li> <li> <a href="five.html">Lore</a> </li> </ul> </nav> <div class="content"> Lorem ipsum </div> <div class="content"> Lorem ipsum </div> </div> <footer> Lorem ips </footer> </body> </html>