Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Sticky footer using pure css

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 501
    Comment on it

    Hello folks!

    The below code is an example of sticky footer using pure CSS. There are other sticky footer methods, which people use but the problem arises that they do not work with all browsers so the method I am providing below will work with all major browsers including IE8+.

    CSS:-

    html, body {height: 100%;}
    section {min-height: 100%;margin-bottom: -50px;}
    section:after {content: "";display: block;}
    footer, section:after {height: 50px; }
    footer{background: #ccc;}
    

    Html:-

    <section>
    Here is Content and all.
    </section>
    <footer>
        Footer
    </footer>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: