How can I code a specific button color change on my website?

I got the following problem. Generally you change the button color and font through the theme settings and this works for legit every button but sadly not for the button I want to change somehow.

The Button should be black with white font and if you hover over it there should be a simple animation. If the product is sold out the button should be white.

How can I code this. I attached a screenshot at the bottom which I ment whats not working on this button.

My Website link is: www.sixtwonine.de

Hi @Jokerdomme

This is Richard from PageFly - Shopify Page Builder App

Please add this code to your theme.liquid above the to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the


Hope this can help you solve the issue

Best regards,

Richard | PageFly

1 Like

Hi Richard,

first of all thanks for the answer. But the button still doesnt change. It is still looking as shown in the screenshot

The hover funktion is working, but instead of making the button bigger I want to slightly change the color.

Well never mind it’s working. I just found out at the first line of youre code the dot on payment-buttons was missing. Thank you very much

But if the item is sold out. How do i unable the hover animation?

Hi @Jokerdomme

You can replace the code with this one