I have a specific problem in which I need to remove the margin-bottom of every Element that has a class only when followed by the same element with the same class. So p.1 has a margin-bottom:1em to give space to any other element that comes after it. But if p.1 is followed by another p.1 the margin-bottom should be 0. The thing is, I can't just give p.text a margin-top because of reasons I don't really want to elaborate.
<p class="text">text</p>
<p class="1">___</p>
<p class="1">___</p>
<p class="1">___</p>
<p class="text">text</p>
So in this exhample the first and second p class="1" need to be selected. I tried p.1 + p.1 but this only selects the second and third because it selects the sibling preceded by another one and not the sibling that is followed by one. Is this understandable?
Is there any way to do that in EPUB2?