Style element that is not next to checkbox or label when checkbox is checked.
For example please see the code snippet below. I would like to make the text within div3 red when the #trigger checkbox is checked. I want to use pure css, no jQuery. The only way I can get it to work is if I move the checkbox above div3.
#trigger:checked+.div1 + .div2 > .div3 {
color: red;
}
<input id="trigger" type="checkbox">
<div class="div1">
<label for="trigger">
CHECKBOX LABEL
</label>
</div>
<div class="div2">
<div class="div3">ABCD</div>
</div>