ekclone
ekclone

Reputation: 1092

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 :)

Upvotes: 0

Views: 3649

Answers (2)

Vasandkumar
Vasandkumar

Reputation: 26

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

Upvotes: 1

earl3s
earl3s

Reputation: 2373

If you change your markup to:

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

That will fix it.

You're referencing an ID in the markup and a class in your CSS.

Upvotes: 0

Related Questions