I need a way to select this outer div
which has three inner span
s (div and span are just examples here):
<div>
<span/>
<span/>
<span/>
</div>
The motivation is to select an element that has three of specified children. If it was just one, I could use div > span
, if I just needed to select the spans (not the outer div), I could use span + span + span
to select them.
Is something like div > (span + span + span)
possible? (I've tried the parentheses but it's invalid)
UPDATE: Since when "an element containing a set of elements" become "selecting a parent"? This is not a duplicate, moreover, this is exactly the opposite of that question.