Centralize related products ( Title )

Topic summary

Goal: center the “YOU MIGHT ALSO LIKE” heading in the product recommendations section on a Shopify product page. The requester asked for a simple CSS solution.

Proposed solutions:

  • Add CSS in theme.liquid: go to Online Store → Themes → Edit code → open theme.liquid and, before , insert a block with .related-products__heading { text-align: center !important; } and save.
  • Alternatively, add CSS in the theme’s main stylesheet (base.css/style.css/theme.css): product-recommendations.related-products h2 { text-align: center !important; }. If this doesn’t apply, add the same rule via the Theme Editor’s Custom CSS for product pages.

Notes: “text-align: center” centers the heading text; “!important” forces the rule to override prior styles. A screenshot was shared showing the centered result, confirming the approach visually.

Status: Solutions provided with clear steps. The original poster has not confirmed success yet, so the thread appears open.

Summarized with AI on December 28. AI used: gpt-5.

Hello guys , do you know a code to centralised this title ( YOU MIGH ALSO LIKE )

thanks guys

https://www.behumblee.com/

Pass-Humblee3030

1 Like

Hello @Suco

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

.related-products__heading { text-align: center !important; } }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Hi @Suco

From your Shopify admin dashboard, click on “Online Store” and then “Themes”.

Find the theme that you want to edit and click on “Actions” and then “Edit code”.

In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

product-recommendations.related-products h2 {
    text-align: center !important;
}

And save.

Result:

If the code wont work on the mention files.

You can paste the code on the custom css on the customize theme edits. Just go on the product pages.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!