Unfortunately, I don't have control over the markup structure but this is how it appears when rendered.
<div class="div1">
<div class="div2">
<p>Please do not choose me</p>
</div>
</div>
<div class="div1">
<strong>
<p>Do not pick me </p>
</strong>
<div class="div2">
<p>Select only with CSS </p>
</div>
</div>
I am interested in selecting the p
tag within div2
, but only if div1
has a sibling containing a strong
element.
Is this functionality achievable?
UPDATE: I made a mistake in my previous statement.