i just went through this myself. that will center the content horizontally, but only if you can declare the width. why can't i just say "use the width of the longest element in the div?" and if you want to center vertically, forget it. might as well use a <table> instead.
holy crap. that's pretty good, man! when i was trying to get this to work a couple of nights ago, i would have gladly given you a hundred bucks for that code snippet, just to make the pain go away.
i was afraid that your method would screw up <ul> lists the way most of my attempts did, where the bullets would wind up stuck to the left margin while the text strings are goofily centered in the middle, but no, your way presents lists properly as well.
your code snippet is going into production for my iphone card game, to replace this awful hacked-together menu i made:
when i was trying to get this to work a couple of nights ago, i would have gladly given you a hundred bucks for that code snippet, just to make the pain go away.
If you like, feel free to give a shout-out to @jjs in your game's credits. :)
oh, this isn't the css-bashing thread? whoops.