Here’s a quick and dirty way to center a website.
It’s simple really. You just need to provide two basic properties in your CSS to include in order to center the content on your website.
Here’s an example of an HTML structure:
And here’s the actual CSS snippet to center the #Wrap div.
margin: 0 auto;
As you can see, you only really need two properties: width and margin. Notice, however, that when using margin: 0 auto; you need to provide a definitive width size.
That’s really all there is to it.