product prices not centered aligned for all mobile phones

Topic summary

Issue: Product prices appeared left-aligned on some devices while product titles were centered. Screenshots showed one case with centered prices and another with prices misaligned; the site URL was provided for reference.

Root cause: The poster later clarified it was a browser-specific rendering issue rather than a phone model problem.

Proposed fix: Add a CSS rule to the theme stylesheet to center price text within product cards:
.card__content .card-information:has(.price) { text-align: center !important; }

Implementation steps: In Shopify admin, go to Online Store > Themes > Edit code, open base.css/style.css/theme.css (whichever exists), and add the rule at the bottom. Save changes.

Outcome: The poster confirmed the CSS change resolved the alignment inconsistency across browsers.

Notes: Attached screenshots illustrated the alignment discrepancy but were not necessary once the fix was applied.

Status: Resolved; no remaining open questions or action items.

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

i asked in here about aligning the prices for our products. i already had the product title centered, but the prices didn’t align with it.

after adding the code, the prices finally centered! then i compared and realized that certain phones still have the prices left aligned. the product name is centered still.

i’m so confused how this is happening. maybe i’ve used too much centering code for different things and this is happening. but i don’t understand why.

can someone help me please? our site is www.thegrumpycookies.com

is there some code to help correct this? i really don’t want everything back to being left aligned
grumpycookies_0-1734905376388.png

screenshot 1 - price is centered

screenshot 2 - price not centered

1 Like

Hi @grumpycookies

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:
.card__content .card-information:has(.price) {
    text-align: center !important;
}

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

thank you sooooooo much! i realized it was a browser issue… not a phone issue. and your code fixed it up just perfect!