Center page title

Hello,

Do you have some CSS code to center page titles? For example “The Blog” at https://www.homegrownfeast.com/ and “About” at https://www.homegrownfeast.com/?page_id=94

I’d like to set it so that page titles are centred on each post and page I create going forward too.

Cheers in advance,

Steve.

Hi Steve,

Thanks for reaching out.

Sure, please add this CSS to Theme Options > CSS

.h-landmark, .page h1 {
text-align: center
}

That’s just also an assumption for the about us title since it’s inaccessible. So please publish it so we could check. This https://developers.google.com/web/tools/chrome-devtools/beginners/css should be helpful too for determining the CSS and its correct selector.

Thanks!

Thanks Rad,

It worked for About too. However, I note that it is centred to the content area rather than on the page as a whole, so doesn’t line up with the menu (it is out of line with “Home”). Is there any way to line this up?

Cheers,

Steve.

Hello Steve,

Please try the code:

.x-header-landmark {
    text-align: center;
}

.x-landmark {
    width: 100%;
    padding-right: 0;
}

Hope this helps.

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