Center align product price & product rating

Solved

Center align product price & product rating

emilyaugstudios
Pathfinder
122 1 58

Hey guys, sorry me again! I want to text align the product price to the center on my product card, like everything else, however I am running into an issue where my product rating can only be added through the price section within my theme, putting the price and rating in the same section line, with this code which stops me from moving the price to the center of the card...

 

.price-container {justify-content: space-between;}

 

Instead what I would love to figure out how to do is center align the product price and then have the rating central aligned below this if possible? Similar to how to how it displays on mobile view. Hope that makes sense?

 

URL – https://pantee.co.uk/?_ab=0&_fd=0&_sc=1&preview_theme_id=144118972631

 

Desktop view (price on left, rating on right) –Screenshot 2024-09-12 at 16.12.19.png

 

 

Mobile view –

Screenshot 2024-09-12 at 16.12.00.png

Accepted Solutions (3)

BSSCommerce-B2B
Shopify Partner
1718 512 575

This is an accepted solution.

@emilyaugstudios ,

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file theme.liquid.

Step 3. Add this code above </body>

<style>
.product-form .price-container {
   flex-direction: column;
   align-items: center;
}
</style>

RESULT:

DESKTOP:

BSSCommerceB2B_0-1726155330617.png

MOBILE

BSSCommerceB2B_1-1726155354965.png

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

emilyaugstudios
Pathfinder
122 1 58

This is an accepted solution.

Hi this works great thank you @BSS-TekLabs – The only issue I am now having is the price sits slightly to the left, not central in line with everything else, I don't know if you can tell based on the photos but is there a way I can move it right a little to be in line?

 

Screenshot 2024-09-12 at 16.43.49.png

View solution in original post

BSS-TekLabs
Shopify Partner
2350 701 826

This is an accepted solution.

<style>
.price-container .product-price {
        margin-right: 0 !important;
    }
</style>

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

View solution in original post

Replies 10 (10)

BSSCommerce-HDL
Shopify Partner
2298 847 1061

Hi @emilyaugstudios, You can try: 

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </head> tag:

 

<style>
.product-form .price-container {
    flex-direction: column !important;
    align-items: center !important;
}
</style>

 

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

Tech_Coding
Shopify Partner
301 76 67

Hello @emilyaugstudios 

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 </body> on theme.liquid
<style>
@media (min-width: 768px) {
  .price-container {

      flex-direction: column !important;
      justify-content: center !important;

     align-items: center !important;
   }
}
</style>

Tech_Coding_0-1726155389955.png

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

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.

BSS-TekLabs
Shopify Partner
2350 701 826
<style>
    .price-container {
        justify-content: center !important;
    }
.price-container .product-price {
        width: 100% !important;
        justify-content: center !important;
        display: flex !important;
    }
</style>

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
BSS-TekLabs
Shopify Partner
2350 701 826

BSSTekLabs_0-1726155172760.png

- Here is the result you will achieve:

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you @emilyaugstudios .

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
emilyaugstudios
Pathfinder
122 1 58

This is an accepted solution.

Hi this works great thank you @BSS-TekLabs – The only issue I am now having is the price sits slightly to the left, not central in line with everything else, I don't know if you can tell based on the photos but is there a way I can move it right a little to be in line?

 

Screenshot 2024-09-12 at 16.43.49.png

BSS-TekLabs
Shopify Partner
2350 701 826

This is an accepted solution.

<style>
.price-container .product-price {
        margin-right: 0 !important;
    }
</style>

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
BSS-TekLabs
Shopify Partner
2350 701 826

- Then add the following code at the before tag </head> and press 'Save' to save it @emilyaugstudios .

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you 

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

BSSCommerce-B2B
Shopify Partner
1718 512 575

This is an accepted solution.

@emilyaugstudios ,

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file theme.liquid.

Step 3. Add this code above </body>

<style>
.product-form .price-container {
   flex-direction: column;
   align-items: center;
}
</style>

RESULT:

DESKTOP:

BSSCommerceB2B_0-1726155330617.png

MOBILE

BSSCommerceB2B_1-1726155354965.png

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

emilyaugstudios
Pathfinder
122 1 58

Hi this works great thank you @BSSCommerce-B2B! The only issue I am now having is the price sits slightly to the left, not central in line with everything else, I don't know if you can tell based on the photos but is there a way I can move it right a little to be in line?

 

Screenshot 2024-09-12 at 16.43.49.png

 

 

BSSCommerce-B2B
Shopify Partner
1718 512 575

@emilyaugstudios , please add more this code

<style>
.product-form .price__default .price__was {
   margin: 0;
}
</style>

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now