Center align post title

Hi guys

I need to center align the post and page titles on my site https://www.broughtonschoolofmotoring.com

An example: https://www.broughtonschoolofmotoring.com/how-to-beat-driving-test-nerves

I’ve tried this CSS:

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

But it doesn’t work.

Can you assist?

Hi Steve,

There seems to be an issue with the CSS code that you have in the Global CSS such as some CSS syntax error that is stopping the CSS code you are adding to work as expected.

To verify that, please copy all the codes that are in the Global CSS and paste it here.

It should provide some information if there are any CSS error that is causing the issue that you have to fix so that the CSS codes will work.

Hope this helps.

I have CSS in more than one place and I think it needs to be combined! Any advice about this would be appreciated. If it should be combined, where should it go?

This is in ‘additional CSS’:

.x-close-content-dock .widget a {
color: red !important;
}
@media (max-width: 767px){
.tco-content-dock {
display: none !important;
}
}

This is inserted via the ‘Simple CSS’ plugin:

/* ===== Strong Testimonials ===== /
/
----- Default template ----- */

/* heading color */
.strong-view.default .testimonial-heading {
color: #3383ff;
}

/* testimonial text color */
.strong-view.default .testimonial-content p {
color: black;
}

/* custom fields color */
.strong-view.default .testimonial-client div {
color: gray;
}

/* heading */
.strong-view.default .testimonial-heading p {
text-align: center;
}

/* circle or oval depending on image’s aspect ratio /
.strong-view.default .testimonial-image img {
border-radius: 50%;
}
/
normal font weight on client name */
.strong-view.default .testimonial-name {
font-weight: normal;
}
.testimonial-heading {
font-size: 28px;
line-height: 1.0;
}
@media (max-width: 767px) {
.x-content-dock {
display: none;
}
}

This is in 'Content CSS" in Cornerstone:

@media (max-width: 767px) {
.tco-content-dock {
display: none;
}
.x-recent-posts-date {
display: none !important;
}
}
.entry-title {
text-align: center;
}

Hello @stevetheadi,

To resolve your issue, please add the following CSS code in the X > Theme Options > Global CSS (http://prntscr.com/evui3r) instead.

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

We would loved to know if this has work for you. Thank you.

Thanks for the reply.

The code has been added to Global CSS but the post titles are still left aligned.

For example: https://www.broughtonschoolofmotoring.com/how-to-move-off-safely

I’ve cleared the page cache so I’m confident that isn’t the issue.

Hi @stevetheadi,

I checked and it seems the CSS is not added, I can’t properly trace it since it’s cached and minified. Perhaps you can clear and disable your cache plugin and test it again?

Thanks!

Hi

thanks.

I’ve done as you suggested. The code definitely is in Global CSS but the post titles are still left aligned (see https://ibb.co/eDB9BV )

Hello @stevetheadi,

It seems that you are having some caching issue. Rad and I could not see the codes in your front end and clearly you have added the code in theme’s custom css section. To resolve this, since you have installed WP Fastest Cache, please clear your plugin cache first and it you have any other cache plugin like WP Autoptimize plugin, please regenerate the minified JS/CSS files and then test your site again.

Please let us know how it goes.

Did that and it works now!

Many thanks for your help.

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.