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

rossanmol
  • 1,633
  • 3
  • 17
  • 34

0 Answers0