We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

product prices not centered aligned for all mobile phones

Solved

product prices not centered aligned for all mobile phones

grumpycookies
Excursionist
36 0 14

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

1aade8c0-4c34-41e0-b0ff-776b7cae7609.jpeg

 

screenshot 2 - price not centered

27e3bc52-e87b-4000-b4ff-3035b376e3ec.jpeg

  

 

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
10211 2427 3079

This is an accepted solution.

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;
}

 

  • And Save.
  • Result:
  • Made4uoRibe_0-1734908656081.png

     

 

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

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Replies 2 (2)

Made4uo-Ribe
Shopify Partner
10211 2427 3079

This is an accepted solution.

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;
}

 

  • And Save.
  • Result:
  • Made4uoRibe_0-1734908656081.png

     

 

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

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
grumpycookies
Excursionist
36 0 14

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