WordPress.org

Ready to get started?Download WordPress

Forums

How to center align link in paragraph (1 post)

  1. hixen
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic