0

I have the following

<div class="prod_price back">£10.75</div>

Its position is set by css. However, if a product is on special offer, the php generated output becomes

<div class="prod_price back">
<span class="normalprice">£11.95</span>
<br></br>
<span class="productSpecialPrice">£8.95</span>
<span class="productPriceDiscount"><br></br>Save 25%</span>
</div>

Due to other elements on the page this causes the prices to be misaligned vertically. A margin-top of -36px applied to .prod_price would put it back into line, but obviously this causes the normal prices to display too far up in the layout.

Is there any method of applying a certain css rule if .prod_price back is followed by span class="xxxxxx"?

If there is, I'm not aware of it.

Steve Price
  • 589
  • 7
  • 26

0 Answers0