Is there a preferred method for centering elements using CSS?
<div style="position: absolute; left: 50%;">
<div style="position: relative; left: -50%">
Centered content
</div>
</div>
or simply
<div style="text-align:center">
Centered content
</div>
?
Edit: Ah, so it seems that "text-align:center" is better suited for inline elements while "margin: 0 auto" is recommended for block elements. Good to know.