samedi 9 mai 2015

Style the first element only if it has the second element preceding it

I have a the following html:

<div class="first"></div>
<div class="second"></div>

I want the style the first element only if it has the second element preceding it

.first + .second {
  //style the first element not the second
}

Aucun commentaire:

Enregistrer un commentaire