How to style child elements?

Hello,
If I want to change the color of my text block and background color of my image , when the mouse is hover the link block, Does I have to make an interaction ?

image

If so, does the interaction generate CSS or JS ?

1 Like

Please watch and read whole section as all these basics are well documented in webflow university or just google webflow hover effects. This will give you better understanding and you will learn a lot.

Hey Stan. Thanks for your answer but it doesn’t asnwer my question.
My question is : Is it possible to do something like this in webflow

.parent:hover .child {
/* … */
}

When the mouse is hover the link block, I want to change the child’s style. I know it’s possible in CSS with few lines of code, but How to achieve this in webflow ?

Yes. Again all these basics are in Webflow University, I can really recommend to learn something about toll you are trying to use.

So I have to put custom code for a simple thing like that ? :unamused:
I’d like a clean solution. Do you know if it’s possible by just using webflow functionnality ? :slight_smile:
Thank you Stan

Unfortunately hover states do not support modifying child elements. You cold either use custom code or interactions for that.

Oh, that’s too bad. :frowning:
Thank you, I’m going to try using interation to achieve this :sneezing_face:

@samsam22 did you ever figure out a clean way to do this? seems overly complex for a simple and common use case.

@Weston - Webflow does not support descendant CSS selectors in the designer. You are free to use custom code as needed if your plan supports it.