Search code examples
htmlcssfooter

How can I add a footer to my website similar to the header?


http://jsfiddle.net/Zj59M/

How can I duplicate that box and put it on the bottom as a footer?

I tried to wrap it in a div and just copy the stylesheet of the heade, but It doesn't work

<div id="footer">
 <p>This is my footer</p>
</div>

and this is my css

.footer {
 background: #ecf0f1;
 margin: 35px 25px;
}

Thank you :)


Solution

  • You should use a class instead of id.

    <div class="footer">
        <p>This is my footer</p>
    </div>
    

    Try using

    <footer class="footer">
        <p>This is my footer</p>
    </footer>
    

    Or refer this video for visual assistance

    https://www.youtube.com/watch?v=CqOOOMeGb5A