It is not as simple as display: auto, but still pretty simple:
http://solstice.co.il/blog/2008-02-26/horizontally-centering-content-dynamic-width-css
Just in case the source is taken out:
<div> <div> My Content </div> </div>
.centered{ margin-left: auto; margin-right: auto; display: table; }