How to Center your page in HTML
Posted in Websites on February 1st, 2007 by Jason – Be the first to commentThere may be several ways that you can center a page using html, this is only one way that works for me. First things first, when you declare your page, it needs to be something like this:
Important, this text has to be placed inside a container, the bigger than less than symbols.
!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
Then you can create a large table with the height set to 100% and center the content vertically, and that should get you up and running. From there you can nest a second table with your website content so that when the browser window is resized, it will always be in the center of the screen. One example of this technique is used on brookereeves.com, a website I made for a photography business in Las Vegas.
Update:
The brookereeves link is no longer active.