1

I have the following html:

<div class="example1"> 123 </div>
<span class="example2"> 1234 </span>

I would like to set background-color to red .example1 only if there is .example2 after it.

This looks very similiar to what I am asking for, but I need opposite: http://www.w3schools.com/cssref/sel_gen_sibling.asp

Coder
  • 1,561
  • 3
  • 14
  • 33

0 Answers0