Site logo

Archived topic

How to left align widget title in singleposts?

9 replies · Started by Shami on October 27, 2020

Viewing posts 1–10 of 10

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.

Hi there,

Edit this CSS you've added:

.single h2 {
    text-align: center;
}

to this:

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

Thanks Leo.

No problem :)

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?

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.

Try this instead:

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

Looks like this is working now. Thanks again.

No problem :)

This archived topic is closed to new replies.