I have the following html:
<div class="parent">
<p class="tag">I live in Duckburg.</p>
</div>
<div class="color">
<p>My best friend is Mickey.</p>
</div>
What I want to do is to apply a color to the second div, if the first div has a child.
I'm applying the following CSS.
.parent > .tag + .color{
background-color: green;
}
Expecting it to select the parent of tag and then selecting the adjuscent color div and apply the background style. But it doesn't work. Can you please help.