I am re-writing a website to HTML5, and I am having some problems with centering the contents of the footer.
My footer HTML is pretty simple
<footer> Copyright </footer>
and the css is
footer {
margin: auto;
height: 330px;
background-color: #1e2127;
color: #ffffff;
}
but the content is not centered with the rest of the page.
What am I missing?
Edit:
I don’t want to center the text inside the footer, only the footer it self (so it will align with the rest of the page), but I want the background to fill out the entire page.
I assume you want the footer centred horizontally, in which case
margin: auto;requires a specified width to centre automatically: