Centering tables with CSS on IE5/Mac
I've been using <table align="center">
in my pages for a few months now because I couldn't get my tables to center align with style="margin: 0px auto"
. Until today, I found this tip with a simple search on Google.
As demonstrated in this simple example
page, IE5/Mac centers tables using the correct margin styles if they
are written in long-form as margin-left:auto;
margin-right:auto;
. The shorthand forms such as margin:0
auto;
do not work. Fortunately this bug is easily worked around by
using the long-form syntax.
Good to know, life just got a little easier.