Search code examples
cssinternet-explorerinternet-explorer-8footersticky-footer

IE8 Sticky Footer Problems


If you view this in Firefox, you'll see that the bottom footer stays right with the window as you resize, move, etc. It also starts right at the bottom without a scrollbar. However, in IE8 I can't get it to sit at the bottom at the beginning OR move with the window, and probably a number of other issues. I got the code from this site, and it says it's IE compatible, so I must be doing something wrong. I had to alter the code a bit to fit my situation, but here's the IE specific css:

* {
margin: 0;
}

#container{
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -30px;
}

#footer, .push{
height: 30px;
width: 100%;
background: -moz-linear-gradient(top, #565656, #303030);
background: -webkit-gradient(linear, left top, left bottom, from(#565656), to(#303030));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#565656', endColorstr='#303030');
text-align:center;
font-family: loginfont;
font-size:13px;
color: #fff;
padding-top:5px;
clear: both;
}

Can anyone tell me what's going wrong? I'm absolutely clueless at this point. I hate IE...


Solution

  • I'm not sure, but it can be the padding-top:5px; which is causing the problem. Try changing the margin: 0 auto -30px; to margin: 0 auto -35px; and see if that helps.