How can I make my footer center to the bottom of the page?

Diallo Dickerson picture Diallo Dickerson · Mar 26, 2013 · Viewed 58.9k times · Source

I'm having trouble centering my footer to the bottom of the page. Here's my code

footer {
background-color: #FFF;
position:fixed;
bottom: 0px;
width: 400px;
text-align: center;
}
<footer align="center">
    <p>March 25, 2</p>
</footer>

Answer

Nasir Mahmood picture Nasir Mahmood · Mar 26, 2013

Just set width to 100%

width: 100%;