Search code examples
cssxhtmlcss-floatfooter

How to create a footer that is always the last thing on the page using float layout


just like the question states, how to keep the footer div as the last element showing on a page using float layout, and regardless of the amount of content preceding the footer.


Solution

  • place the following at the end of your code (before </body>)

    <div id="footer">Footer</div>
    

    Add the following to your stylesheet:

    #footer{ clear:both; }