Select all elements of the direct descendant of dom, regardless of type

I am trying to apply CSS to any immediate child of a parent container. How to use the < selector for CSS descendants to select any immediate child regardless of type (div / span / etc).

+12
source share
1 answer

I assume you mean a child selector. He > , not < .

 .parent > * 

This will select any item. Of course, you can use any other selector as a child (element, class, identifier, etc.).

+19
source

All Articles