Shopify themes, liquid, logos, and UX
Hi guys. Am using Expanse theme, I wish to change compare price colour to black on both collection and product page. Please me with code.
Thanks!
Solved! Go to the solution
This is an accepted solution.
Hi @Eze_Paul
This is Henry from PageFly - Landing Page Builder App
You can try this code by following these steps:
Step 1: Go to Online Store->Theme->Edit code.
Step 2: Search file components.css
Step 3: Paste the below code at bottom of the file -> Save
span.product__price.product__price--compare span, span.grid-product__price--original span {color: black !important;}
Hope that my solution works for you.
Best regards,
Henry | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Hello Eze_Paul,
Looking at your shop, all the div elements for the prices have the color red, that's why your they all look similar.
In the product page with the discount prices, you have the following structure:
<span data-compare-price="" class="product__price product__price--compare">
<span aria-hidden="true">16 000 kr</span>
<span class="visually-hidden">16 000 kr</span>
</span>
Adding the following somewhere in your theme should fix it:
.product__price--compare {
color: #000;
}
In the collection page, you have the following structure for prices with a discount:
<div class="grid-product__price"><span class="visually-hidden">Sale price</span><span class="grid-product__price--current">
<span aria-hidden="true">17 900 kr</span>
<span class="visually-hidden">17 900 kr</span>
</span><span class="visually-hidden">Regular price</span>
<span class="grid-product__price--original">
<span aria-hidden="true">20 000 kr</span>
<span class="visually-hidden">20 000 kr</span>
</span><span class="grid-product__price--savings">
Save 11%
</span></div>
Adding the following somewhere in your theme should fix it:
.grid-product__price--current {
color: #000;
}
This is an accepted solution.
Hi @Eze_Paul
This is Henry from PageFly - Landing Page Builder App
You can try this code by following these steps:
Step 1: Go to Online Store->Theme->Edit code.
Step 2: Search file components.css
Step 3: Paste the below code at bottom of the file -> Save
span.product__price.product__price--compare span, span.grid-product__price--original span {color: black !important;}
Hope that my solution works for you.
Best regards,
Henry | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025