WordPress.org

Support

Support » How-To and Troubleshooting » How to center align link in paragraph

How to center align link in paragraph

  • This is driving me nuts

    If I would hard code it, it would look something like this.

    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam feugiat venenatis orci, eu</p>
    <a href="/about" class="btn">Read more</a>

    and this should be the css:

    p {text-align: left;}
    a.btn {text-algin: center;}

    but since I’m using the WordPress editor, it adds a <p></p> to my link like this.

    <p><a href="/about" class="btn">Read more</a></p>

    Which breaks it, and the link is left aligned.

    I’m also using the Bootstrap from Twitter (why you see the .btn class)

    So anyone can point me in the right direction?

  • The topic ‘How to center align link in paragraph’ is closed to new replies.