This blog is about Graphic Design, Vector Art, and Cartoon Illustration

Designing web pages - how to center your page

It just seems to make sense to center your web page. Web pages that are all scrunched over to the left, even though that's the default, look kind of weird to me. And even though the center tag is gone, you can still do it.

To start, you will need to create a page division (a div) with an ID. It is becoming conventional to call it *container*, but it really doesn't matter what you call it. If you call it container, and you are in a class that I am teaching, it will help me to find it for you, though. So please call it container.

Once you have created a CSS page rule with an ID container, you can set the size of the page and where it displays on the screen. The size of the page is under *width*. Height, by the way, is really meaningless, you don't know how long the page will scroll on any given computer screen, leave it blank.

To center the container, set the top and bottom to zero, the left and right to auto.

And that's a good place to start!