It appears that CSS is indeed right-associative, and unlike traditional programming languages, the use of parentheses does not alter this behavior.
Here is the basic structure I am working with:
<div>
<div class='pizza'></div>
</div>
<p>Select me! Select me!</p>
<div>
<div class="pizza">
<p>Do NOT select me!</p>
</div>
</div>
I am struggling to determine the correct selector for a <p>
element that follows a sibling <div>
containing a <div class="pizza">
.
My attempted solution using div > div.pizza + p
did not produce the desired results due to the right-to-left associativity in CSS.
Any suggestions or guidance on how to achieve this specific selection?