|
The most common way now is using CSS and setting the left and right margins to auto for your containing div, as has been stated. The only downside to this is that it doesn't work in older versions of IE. If you don't care about that, then you're all set.
If you do care about older versions of IE, then the way around it is by setting the text align to center for the body. But doing this will center everything! So then you'll have to set the text align to left for any areas where you don't want the text to be centered.
|