How do I apply a hover effect on an a element, but not to an a element with the class active?
a:hover(not: .active)
Seems something is missing.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The functional notation is on
:not(), not:hover:If you prefer to put
:hoverfirst, that’s fine:It doesn’t matter which pseudo-class comes first or last; either way, the selector works the same. It just happens to be my personal convention to put
:hoverlast as I tend to place user-interaction pseudo-classes behind structural pseudo-classes.