Geeks With Blogs
Chris Smith My blog for anything tech

I always have to google this whenever I need it.  So instead of searching every time I am putting it here.  I originally got this from Reign Water Designs. 

Check the link here:

This will only work if the DOCTYPE is XHTML Transitional or Strict. IT WILL NOT WORK if your doctype is HTML 4.x. Here is an example of what it should look like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en"> 

Put this at the top of your CSS file.

#html, body {
   top: 0px;
   right: 0px;
   bottom: 0px;
   left: 0px;
   height: 100%;
   margin: auto;
Posted on Tuesday, December 4, 2012 2:16 PM | Back to top

Comments on this post: Center an Html page with CSS

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © csmith18119 | Powered by: