Centering a table w/ css

I got this little menu thing with thumbnails. I use this CSS code to center it:

.sketchNavBar {text-align:center; margin-left: auto; margin-right: auto;}

and it works fine in every browser on my Mac but not in IE on Win :frowning:
I found this hint somewhere saying that Win IE requires text-align:center; to be added for the table to be centered. That’s why I put it there but it doesn’t seem to change anything…

the page is there if you wanna look at it:
http://www.mrxsss.com/sketches.html

the little squares on top are supposed to be centered horizontally…

Thx for any help at all :slight_smile:

so, there’s no CSS enabled guru on Kirupa? ****…

Getting CSS to behave cross-browser and cross-platform is akin to herding cats. Most of us find that the effort only iritates the cats. I try to stick to those CSS commands that do work cross-browser, or design the page so it “degrades gracefully” in those browsers that don’t support the CSS commands used.

Bottom line, if it isn’t supported by IE on Windows then you’re optimizing your design for a relatively small percentage of users. Your page still looks fine in IE on Windows. I’d suggest replacing the CSS with a simple align=“center” in the appropiate TABLE, TR, or TD tags. Sometimes simple is best.

align=“center”… Why didn’t I think of that?! :wink:
OK, I just didn’t know it was so hard to center stuff w/ CSS on Win.
CSS does have the advantage to centralize the formating on one external file and make updates of entire sites super easy. That’s why I try to use it as much as possible…
Thx 4 the reply tho :slight_smile: