0

I know you can change the style of a selector on hover of another selector, but it doesn't work when the selector you need to change uses two element names like this:

Doesn't work. Anyway to make this work with just CSS?

.menu-btn:hover .menu-btn span  {
    /*styles*/
}

Works

.menu-btn:hover span  {
     /*styles*/
}
1
  • 1
    Can you explain what you need exactly? Commented Aug 18, 2017 at 14:13

2 Answers 2

1
.menu-btn:hover span, .menu-btn span  {
/*styles*/

}

Sign up to request clarification or add additional context in comments.

Comments

0

Use a coma between .menu-btn:hover span and .menu-btn span. This should probably work if I understood your question correctly.

.menu-btn:hover span, .menu-btn span  {
    //code;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.