Streaming live at 10am (PST)

Style an element but only when it belongs to a parent

Hey guys.

In the right side editor, how can I select and style say ‘dropdown’, but only when it’s under ‘menu’?

In plain css, I’m looking to style only:
.menu .dropdown {}

instead of the generic:
.dropdown {}


Hi @Alex_Hartan,

You need to create this class before you can edit it.
Once you create the class, you can choose it and edit the styles :slight_smile:

Thanks for the response avivtech

Both classes are already created and the markup is:

div class=“menu”
____div class=“dropdown”

I need to edit the properties of .dropdown, but only when its nested under .menu

You can do this with custom CSS. If you needed to toggle a style off and on, just use jQuery or vanilla JS.

1 Like


I was hoping webflow had this feature and I didn’t see it, but it seems custom css is indeed the best fix for this.