WordPress.org

Ready to get started?Download WordPress

Forums

Center Title In Pages (4 posts)

  1. William Speruzzi
    Member
    Posted 7 years ago #

    If you take a look you can see all the pages under "Content" have the title in them placed left. How can I center them all?

    I asked this once before in an old post but got no answer so I'm giving it another shot.

    Thanks for the help.

  2. jkeyes
    Member
    Posted 7 years ago #

    Add this to your themes style.css:

    .posts h2 { text-align: center; }

  3. William Speruzzi
    Member
    Posted 7 years ago #

    jkeyes - Thanks, that syntax definitely does work, only I just want the page titles centered, not the posts. With that code it's an overall shift. Any ideas?

  4. jkeyes
    Member
    Posted 7 years ago #

    That shouldn't center the posts as well as it only selects the h2 tag.

    To make it more precise you could add a class="post_title" to your title h2, and change the CSS rule to:

    .post_title { text-align: center; }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags