Center In Browser

Center In Browser

Steps to center a website in a browser window

  1. Verify there is a valid DOCTYPE declaration at the top of the layout (.aspx) file
  2. Create an initial container DIV within the Body tags of the layout file to act as the website's wrapper and assign it an ID
  3. Specify a width and "margin:0 auto;" for the ID in your stylesheet (auto makes the left and right margins center the container)

Sources