Search code examples
htmlcssfooter

Why wont my footer stick ?


I want to stick my footer to the very bottom of the page without spacing so it show the same on every screen.

This is how it looks currently:

http://www.slyfiles.com/login.php

Footer code:

<div class="footer">
<div class="container">
<span id="footer"> &copy; 2012 SlyFiles &nbsp;<a href="#">About</a>  &nbsp<a     href="#">TOS</a>  &nbsp<a href="#">DMCA</a>  </span>
</div>
</div>

and the CSS:

.footer {
background: #1d1d1d;
width: 100%;
height: 32px;
border-top: solid 10px #017cc5;
margin-top: 5px;
}

Why won't it stick to bottom?

Thanks!


Solution

  • Add this to your CSS for .footer:

    position: fixed;
    bottom: 0;