• Resolved icebing

    (@icebing)


    Hi,

    I need to change the color of variable product price range? For example, the price is $10-$100. I was able to change the color of “$10” and “$100” with the customized CSS code. However, the dash sign “-” did not change the color. Does anyone have the clue? Much appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • For me it’s:

    .woocommerce ul.products li.product .price {
        color: #77a464;
        color: red!important;
    }

    you might have to put !important in as well, depending on the theme used.

    Morris

    Thread Starter icebing

    (@icebing)

    Thank you for your input, Morris! I tried your code and it works for the product catalog page! However, it does not work for the product page of each product.

    For the page of each product, I’ve tried this so far:

    .price .woocommerce-Price-currencySymbol{
    color: #FFFFFF !important;
    }
    
    .woocommerce-Price-amount.amount {
    color: #FFFFFF;
    }
    

    This changes the color of the dollar sign and price but does not change the dash sign.

    Thanks again!

    • This reply was modified 3 years, 7 months ago by icebing.
    Nico

    (@nicolamustone)

    Automattic Happiness Engineer

    Hello,
    Please send a link to your site so that we can check and see what is the best code for your site.

    A link to one of the products where you are having issues would be perfect.

    Thread Starter icebing

    (@icebing)

    Thanks, Nicola! Not sure if I could provide the link as I am running my WordPress locally. But I copied the page source code for your reference if possible.

    https://github.com/icebing/wordpress/blob/main/example.txt

    I guess the problem occurs at line #296..

    <p class="price"><span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">$</span>40.00</bdi></span> &ndash; <span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">$</span>218.00</bdi></span></p>
    

    Thanks!

    • This reply was modified 3 years, 7 months ago by icebing.
    Thread Starter icebing

    (@icebing)

    I figured out in this way.

    .price {
        color: #FFFFFF ;
    }
    
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to change the color of variable product price range?’ is closed to new replies.