Can I center the page title using custom CSS in Shopify?

Topic summary

Main issue: The OP wants to center a page title in a Shopify theme and couldn’t find a setting to do it, asking for a CSS solution. A screenshot link was provided to illustrate the current layout.

Proposed fix: A responder suggested adding CSS targeting the title class:

  • .page-title { text-align: center; }

Current status: The OP reported that the snippet didn’t work (even after refresh) and shared another screenshot. Another participant requested the store URL (and password if the store is protected) to investigate directly. A subsequent comment asked if there’s a known fix.

Notes:

  • The provided CSS centers text within elements that use the class “page-title.” If the theme uses a different selector or overrides exist, this code may not apply as-is (exact cause not confirmed in thread).
  • Screenshots are used to show the issue and the unchanged result after trying the CSS.

Outcome: No resolution yet. Next step is for the OP to share the store URL (and password if applicable) so members can inspect the theme structure and advise the correct selector or placement.

Summarized with AI on January 6. AI used: gpt-5.

Hello everyone,

Is it possible to center the page title using custom CSS code in Shopify? I’ve tried exploring the theme settings, but couldn’t find an option to do so. If anyone has successfully centered the page title using CSS, could you please share the code snippet?

Thank you in advance for your help!
https://prnt.sc/o62cmHlxOlYC

Yes, it is possible to center the page title using custom CSS code in Shopify. Here’s a code snippet you can use:

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

its not working for me :disappointed_face: refresh theme
https://prnt.sc/V3SDAPcMro2B

Hi,
Please share your store URL and if your store is password protected then also provide password too.
Thank you.

Do you know how to fix the problem?