All things Shopify and commerce
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) –
Mobile view –
Solved! Go to the solution
This is an accepted solution.
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:
MOBILE
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
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?
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
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
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>
my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
<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
- 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
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?
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
- 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
This is an accepted solution.
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:
MOBILE
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
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?
@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
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024