Q:

Centering footer contents with css in html5

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.

A:

hope this is what you want demo
footer {
    margin: auto;
    height: 330px;
    background-color: #1e2127;
    color: #ffffff;
    text-align:center; //to align the text in center
}​

A:

I assume you want the footer centred horizontally, in which case margin: auto; requires a specified width to centre automatically:
footer {
  margin: auto;
  width: 960px;
  /* other styles */
}

A:

You haven't given the footer a width, which means it will default to 100%, with the text left aligned.  Add text-align: center to center the text, or add a width to center the whole footer.

