S
S
Sergey2015-11-08 21:41:31
css
Sergey, 2015-11-08 21:41:31

Set style to parent if there is a child?

How to style a div if it has an a tag
div:not(a){} /* обратная выборка этого */

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2015-11-08
@Sergamers

There is no way to achieve this with CSS right now. Maybe in the future CSS4 will have :has() .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question