Streaming live at 10am (PST)

Hover States to Trigger Parent and Children


#1

I created a custom button div with two child text boxes. I want to hover over the button div and have it trigger the two child text boxes to their hover state at the same time. Currently, their hover states activate only when I hover over the actual element. There seems to be no easy way to do this.

Example: http://test-crap.webflow.io/

When hovering over the button div I want both lines of text to change to white.


#2

Lucky for us text color is a CSS attribute that cascades down to child elements.

Remove any text color settings from the text elements and instead apply it to the parent div.
You should see that color take effect on the text. Now apply the hover state to the parent div as well.


#3

Of course! I can't believe I overlooked that. Thank you!


#4

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.