How to stick the footer to the buttom of the page

As usual there are more roads leading to Mekka. This is one way of getting the same result without any scripts. It uses a simple cascading stylesheet:


div#footer
{
   clear: both;
   padding: .5em 1em;
   border-top: 0px solid #ccc;
   text-align: center;
   padding: 0 0 0 0;
   margin: -20px 0 0 -100px;
   position: fixed;
   left : 50%;
   top: 100%;
}

Author: Pouya Panahy

Microsoft certified DevOps engineer with passion in analysing, designing and implementing solutions for Azure Cloud with hands-on experience in security and quality assurence.

One thought on “How to stick the footer to the buttom of the page”

Leave a Reply