HTML CSS examples for CSS Widget:Footer stick to bottom
Create Sticky footer
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html, body { height:100%; } .footer<!-- w w w .j a v a 2s . c o m--> { width:799px; border-top:3px solid Chartreuse; clear:both; padding:6px 0 0 0; background-color:yellow; text-align:center; bottom:0; background-color:blue; position:relative; height:31px; margin:-31px auto 3px auto; z-index:31; } .container { width:789px; margin:0px auto 0px auto; padding:0px 0px 31px 0px; border:6px solid pink; background-color:OrangeRed; min-height:100%; position:relative; content:" "; display:table; } .contentleft { background-color:grey; margin:6px 11px 11px 11px; padding:11px 6px 31px 6px; float:left; overflow:hidden; width:301px; display:block; } .contentright { background-color:BlueViolet; margin:6px 0px 11px 11px; border:0px solid Chartreuse; padding:11px 6px 31px 6px; float:left; overflow:hidden; width:421px; display:block; } </style> </head> <body> <div class="container"> <div class="contentleft"> Lorem ipsum dolor sit </div> <div class="contentright"> Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit <br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus </div> </div> <div class="clearer"></div> <div class="footer"> Lorem ipsum dol </div> </body> </html>