Home › Forums › CSS › Using ~ and + selectors for conditional php loop › Reply To: Using ~ and + selectors for conditional php loop
August 12, 2013 at 4:13 pm
#146572
Senff
Participant
If you are looking for something like this setup, why not just add some right-margin to the image?
http://codepen.io/senff/pen/FEpxG
But, if you must target the elements next to the IMG, you can’t use the ~ sign because that will target ALL elements that come after any IMG (which, basically, is everything in the document). You’d have to wrap every block in a separate DIV to achieve that: