Okay
  Public Ticket #2574939
Add to cart button color
Closed

Comments

  • ctangmo started the conversation

    Hello, I would like to change the button color and font color of the "add to cart" button without it affecting the rest of the colors on my site. I tried doing it in elementor, but it didn't work.

  •  869
    Neuron replied

    Hi,

    Can you tell us the style you want it to be so we will provide you with some CSS for changing that.

    Feel free to ask for anything you need.

    Kind Regards


  • ctangmo replied

    Thank you! I would like the button color to be black and text color to be white. I don't know how it will affect hover, but just in case, on hover the button changes to white (with a black border) and black text.

  •  869
    Neuron replied

    Hi,

    Please add the following code to Appearance > Customize > Additional CSS.

    .woocommerce-variation-add-to-cart .single_add_to_cart_button {
        background-color: #000 !important;
      opacity: 1 !important;
      color: #FFF !important;
    }
    .woocommerce-variation-add-to-cart .single_add_to_cart_button:hover {
        background-color: #FFF !important;
      opacity: 1 !important;
        border: 1px solid #000 !important;
      color: #000 !important;
    }

    Feel free to ask for anything you need.

    Kind Regards


  • ctangmo replied

    Thanks so much, it worked perfectly! :)

  •  869
    Neuron replied

    You are welcome anytime, feel free to ask for anything you need

    If you like our theme, please leave us a rate with 5 stars at ThemeForest, that would help us a lot.

    Kind Regards,
    NeuronThemes


  • ctangmo replied

    Hello, sorry to bother again but I overlooked something about the code. For some reason, it only shows the updated black button color on variable product pages and not single product pages. Is there a fix for this?

  •  869
    Neuron replied

    Hi,

    Can you please provide me with your WP-admin, I will have a quick look to see what's going on.

    Feel free to ask for anything you need.

    Kind Regards


  •   ctangmo replied privately
  •  869
    Neuron replied

    Hi,

    Please add the following code to Appearance > Customize > Additional CSS, and it will change the style of all "add to cart" buttons in your shop.

    .woocommerce .button {
        background-color: #000 !important;
        color: #FFF !important;
    }

    Feel free to ask for anything you need.

    Kind Regards


  • ctangmo replied

    Thank you so much, it works on every product now :)

  •  869
    Neuron replied

    You are welcome anytime, feel free to ask for anything you need

    If you like our theme, please leave us a rate with 5 stars at ThemeForest, that would help us a lot.

    Kind Regards,
    NeuronThemes