Just created a Web page and found it aligned at the far end of your browser window rather than in the center? Well, this post is just for you. Read on to find out how you can center your Web page.
The solution is a small tweak in your CSS and consists of two simple steps:
- Wrap the content in the <body> tag in a new div.
- Assign an ID to the div and style it to declare a width for the page, and set left and right margins to auto.
Watch this video to see how to insert the div and set the CSS properties: