[Resolved] How to left align widget title in singleposts?

Home Forums Support [Resolved] How to left align widget title in singleposts?

Home Forums Support How to left align widget title in singleposts?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1506743
    Shami

    I have left-aligned the widget titles in the footer widgets.
    But somehow, the widget titles are center-aligned by default on the posts.
    I think I’m missing some part of the CSS.
    I’m using this right now:

    .widget-tile {
    text-align:left;
    }

    Note: I don’t want to left align widget title in the sidebar. I want to make change only in the footer widgets.

    #1506749
    Leo
    Staff
    Customer Support

    Hi there,

    Edit this CSS you’ve added:

    .single h2 {
        text-align: center;
    }

    to this:

    .single .entry-title h2 {
        text-align: center;
    }
    #1506756
    Shami

    Thanks Leo.

    #1506758
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

    #1512667
    Shami

    Hey, I want to center-align the h2 tag only in the singlepost and sidebar widget title. But want to keep it left-aligned in the footer.
    The change I made above has caused the all the h2 tags to be left-aligned.
    I just noticed it today.

    What css should I use?

    #1512727
    Leo
    Staff
    Customer Support

    I’m not my CSS being added here:
    https://generatepress.com/forums/topic/how-to-left-align-widget-title-in-singleposts/#post-1506749

    Can you add it in first?

    It should center all the h2 in post content.

    #1512770
    Shami

    I’ve added this css:
    .single .entry-title h2 {
    text-align: center;
    }

    But still, the h2 are left-aligned.

    I saw this change after I updated my wordpress to the latest version today.

    #1512955
    Leo
    Staff
    Customer Support

    Try this instead:

    .single .entry-content h2 {
        text-align: center;
    }
    #1512984
    Shami

    Looks like this is working now. Thanks again.

    #1512995
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.