• Resolved delrod

    (@delrod)


    Hello,

    I use the following code to change the hover background color of all buttons on my website and it works well:

    a:hover.wp-block-button__link {background-color: #decfa8;}

    However, I use the following code to target a specific button-block but it does not apply:

    a:hover.specific-button .wp-block-button__link {background-color: #ff0000 !important;}

    Please note: .specific-button is the class name of the button, which is done through the advanced tab.

    I also tried other ways to write the code, but unfortunately, it does not apply. For example, I tried these ways:

    a:hover.specific-button {background-color: #ff0000 !important;}

    or

    .specific-button:hover {background-color: #ff0000 !important;}

    Thank you for checking this post!

    • This topic was modified 10 months ago by delrod.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter delrod

    (@delrod)

    ?

    Moderator jordesign

    (@jordesign)

    Hey @delrod – without a link the the specific page this is appearing on – it can be a little tricky to offer a solution without testing. Are you able to share a link to the page, and let us know which button it is?

    In terms of general advice – I’d recommend trying this out as a first attempt.

    .specific-button :hover.wp-block-button__link {background-color: 
    #ff0000
     !important;}
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing the hover background color of a specific button’ is closed to new replies.