Centering your page in all browsers

If all browsers were standards compliant, centering your page would be simple. All you would need to do, is set a width to the div that your page is wrapped in, and set the left and right margin to auto, like this:


Thanks to Microsoft and more specifically their browser bakers who made Internet Explorer, we need more than just this.

Here are some examples to show you what I mean:

Please note, that by IE 5, I mean only Windows IE 5, as IE 5 for Macintosh is a totally different browser, which behaves just like the other browsers in this matter.