What's the best way to center using CSS?
<div style="position: absolute; left: 50%;">
<div style="position: relative; left: -50%">
Centered content
</div>
</div>
or just
<div style="text-align:center">
Centered content
</div>
?
Edit: ok, so I should use "text-align:center" for inline elements and "margin: 0 auto" for block elemtns Thank you.