vendredi 22 janvier 2016

How to find last/first not empty child using only CSS?

Let's say I have this:

<div>
   <span>1</span>
   <span>2</span>
   <span>3</span>
   <span></span>
  <span></span>
</div>

and want to add comma to each non-empty element, besides the last non-empty one (Not last child). So from "1 2 3" I want to have "1, 2, 3".

Excluding last child is easy http://ift.tt/1neicFT But this last non-empty...

Thank you in advance for all your help :)




Aucun commentaire:

Enregistrer un commentaire