Center text on product pages, main - collection - featured products

Topic summary

A user seeks to center-align all text (product titles, descriptions, prices) beneath product images across their Shopify store—including product pages, collections, and featured product cards.

Solution Provided:

  • Add CSS code to the theme’s stylesheet (base.css, style.css, or theme.css)
  • Specific code snippet: .card__information * { text-align: center; }
  • This targets card information elements and applies center alignment

Outcome:

  • The original poster successfully implemented the fix by adding the code to component--price.css instead of base.css
  • The solution worked as intended, achieving the desired centered text layout
  • Issue resolved
Summarized with AI on November 18. AI used: claude-sonnet-4-5-20250929.

Hi, i do some redesigning of my site, and i want to put all product/card/page/collections text to the center under the product photo, Hope to have some help over here i will be grateful, thanks in advance.

I have tried several codes but some took the header and let the rest on the right side.

Check my page for further information. :slightly_smiling_face:

My site:

www.dekanten.no

1 Like

Hi @Dekanten ,

Try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. 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:
  4. And Save.
.card__information * {
    text-align: center;
}

Result:

I hope it help.

1 Like

@Made4uo-Ribe Thank u so much, i tried the base without changes, but i put the code in the component–price.css instead. It seems to work like a charm now. :slightly_smiling_face: Pleased with the result. :slightly_smiling_face:

1 Like