Adjacent Sibling Selector Review

Yes it should work - this is regular CSS. Add url / example.

“adjacent” means “immediately following”.
W3Schools Tryit Editor

immediately - so check again if in your site tree #div1 is after #div2 "immediately "

Good

<div id="div1"></div>
<div id="div2"></div>

“bad”

    <div id="div1"></div>
     <p>now #div2 not immediately after #div1</p>
    <div id="div2"></div>

“bad2”

    <div id="div1">
        <div id="div2">i am child not sibling</div>
  </div>
1 Like