Friday, July 8, 2011

How to centralize content in div by CSS?


<div style="width: 50%; margin: 0 auto;">Hello</div>
OR
<div style="text-align: center">
    <div style=
"width: 50%; margin: 0 auto; text-align: left">Hello</div>
</div>

No comments:

Post a Comment