Sticky Footer help!

I am trying to make a sticky footer for my web page, I found some CSS that does keep the footer at the bottom but has a few downsides. 1, If you keep scrolling down the page the page just gets bigger and bigger (that was completely unexpected, no idea what caused that). 2 it moves down with the page in a jerky action, like stop..go..stop..go. Are there any tweaks or different code that might allow a smooth moving sticky footer to stay at the bottom of the page?

by the way, this code was oringaly for a static menu, I just adapted it for a sticky footer

Here's the javascript code,

<script type="text/javascript">
  // attribute added inline inside tag)

    var staticmenuids=["staticmenu"]

    var staticmenuoffsetY=[]

    function getmenuoffsetY(){
for (var i=0; i<staticmenuids.length; i++){
    var currentmenu=document.getElementById(staticmenuids[i])
 staticmenuoffsetY.push(isNaN(parseInt( 0 :   

 function initstaticmenu(){
   var iebody=(document.compatMode &&  
   document.documentElement : document.body
   var topcorner=(window.pageYOffset)? window.pageYOffset : iebody.scrollTop
   for (var i=0; i<staticmenuids.length; i++)

       setTimeout("initstaticmenu()", 5)

   if (window.addEventListener)
      window.addEventListener("load", getmenuoffsetY, false)
   else if (window.attachEvent)
      window.attachEvent("onload", getmenuoffsetY)

The CSS:

width: 99%;
position: absolute;

html>body .wireframemenu a{ /*Non IE rule*/
width: auto;

Now the sticky footer:

<div id="staticmenu" class="wireframemenu" style="top: 520px;">



You don't need any javascript for just a sticky footer. Just take a look at the sticky footer I'm using on one of my sites: Link in sticky footer not clickable in Firefox and Chrome


Best thing since sliced bread:


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.