Unable to change button text color on hover with custom css #23963
ShivamJ07
announced in
Developers Community
Replies: 1 comment 1 reply
-
After some more testing, I was able to rectify the issue by adding the span selector as well, so the following worked: selector:hover span { color: red !important; } I am not sure why the previous approach did not work and why I had to specifically select the span. Is this considered best practice or is there a different way to style text in buttons with custom css? Thanks |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we just recently started with elementor pro. We were having some difficulty modifying a button's text color on hover with custom css. I am aware elementor already provides in-built functionality for this but we are trying it for testing purposes.
selector:hover { color: red !important; }
We added the above CSS in the custom css section for the button but when we tested it, there was no effect. However, when we tried changing padding on hover, it worked as intended. I do not understand this works for padding but not for text color or other text modifiers? Any insight is greatly appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions