HTML:
Some content
CSS:
body {
margin: 0 auto;
width: 470px;
back
The body actually is taking that width, and it is centering. It's just a CSS quirk that makes the background occupy the whole page rather than the space actually occupied by the body element.
A way to fix this is to include a background
property on the html
tag.
Here's an example.
However, as mentioned by others, this probably isn't something you want to do. It's better to add a div
within the body and style that.