Add to Basket Button Flashing Purple
-
Hi,
I’m having problems with CSS for the colour of my “Add to Cart Button” and hope someone can advise.
I’ve added the following CSS to the style sheet in my child theme, to change the colour of my “Add to Cart Button” on product pages.
#ttr_content .ttr_post .ttr_article .product .button,.woocommerce-cart #ttr_content .ttr_article .product .button, .btn.btn-primary, .btn.btn-primary:focus { background-color:#1FDE35; background:rgba(31,222,53,1); background-clip:padding-box;color:#FFFFFF; border-color:#FFFFFF; } #ttr_content .ttr_post .ttr_article .product .button:hover,.woocommerce-cart #ttr_content .ttr_article .product .button:hover, .btn.btn-primary:hover, a.btn.btn-primary:hover { background-color:#1DD132; background:rgba(29,209,50,1); background-clip:padding-box;color:#FFFFFF; border-color:#FFFFFF; }
The button does show as green, with a different shade of green on hover. However, I’m getting a quick flash of purple, before the green button shows! You can see the effect at this url – https://www.internetsquad.co.uk/testsite/product/21st-century-card-trick/ Any of the product pages also does the same.
The vendor for the theme software I’m using says – “The purple color is coming from Woocommerce CSS which loads before the theme’s CSS file by default”.
Is there anything I can do to fix this, so the button doesn’t flash purple?
I hope someone can advise.
Myles
Edit. I’m using WordPress 5.1 & WooCommerce 3.5.6
The page I need help with: [log in to see the link]
- The topic ‘Add to Basket Button Flashing Purple’ is closed to new replies.