Indent text left and right

Posted by Elliott on Stack Overflow See other posts from Stack Overflow or by Elliott
Published on 2010-04-20T14:19:59Z Indexed on 2010/04/20 14:23 UTC
Read the original article Hit count: 312

Filed under:
|

I am using the p tag to align text left and right on the same line using:

.left
{
    float: left;
    text-indent: 5px;
    margin-top: 0px;
}

.right
{
    float: right;
    text-indent: 5px;
    margin-top: 0px;
}

<div id="content">

    <p class="left">Left Text </p>

    <p class="right">Right Text </p>

</div>

The left text will indent by 5 pixels, the right text will not. I have tried -5px and just 5px, any ideas how I could do this?

Thanks

© Stack Overflow or respective owner

Related posts about html

Related posts about css