WordPress.org

Ready to get started?Download WordPress

Forums

Parabola
How to Center Page and Post Titles (4 posts)

  1. linbmcd
    Member
    Posted 3 months ago #

    What CSS can I use to center a post or page title? I've searched the forum and tried several suggestions, none of which have worked. Here's an example:http://www.awakenedlives.com/stress-reduction-workshop-interest-form/?preview=true&preview_id=622&preview_nonce=d843a5aa7d

    I would like the "Stress Reduction Workshop Interest Form" title centered. Thanks.

  2. Andrew
    Forum Moderator
    Posted 3 months ago #

    If the theme doesn't have a designated section of the dashboard for CSS modifications then install this Custom CSS Manager plugin http://wordpress.org/plugins/custom-css-manager-plugin

    Then use its "CSS Code" section of the dashboard to hold your CSS modifications:

    #content h1.entry-title {
     text-align: center;
    }

    http://www.w3.org/Style/Examples/007/center.en.html

  3. linbmcd
    Member
    Posted 3 months ago #

    Thanks, Andrew. I use Parabola theme, which includes a Custom CSS section that enables me to make changes without having them overwritten when I update the theme. Your code worked perfectly.

    #content h1.entry-title {
    text-align: center;
    }

    One other question if you don't mind. The CSS code you provided is global - do you know how I could set this so it only applied to certain pages or posts? Thanks.

  4. Andrew
    Forum Moderator
    Posted 3 months ago #

    When viewing your Webpage that you want to style, right click anywhere on the page and select "View source".

    Then search for "<body".

    The Parabola theme probably spits out classes in this "<body>" element that are unique to certain pages, e.g. "page-id-622".

    So you'd just prepend your CSS with that class, e.g.:

    .page-id-622 #content h1.entry-title {
     text-align: center;
    }

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.