I have a woocommerce setup and I want to showcase the original prices by striking them out like a price tag when products are on sale.
However, there seems to be an issue with the space that woocommerce automatically adds between the currency and the price amount, which unfortunately cannot be altered. When I try using
.amount{ text-decoration: line-through;}
, the strike only goes through the text and not the space in between. I want a single line crossing everything.
This is how it currently appears:
https://i.sstatic.net/C13xn.png
This is the desired look:
https://i.sstatic.net/tNLvD.png
I attempted a solution using border-bottom: 1px solid;
, but the challenge lies in not being able to apply negative padding...
Any suggestions on how to address this css problem? It may seem minor, but despite extensive research, I haven't been able to find a fix.
Edit:
Here's the HTML/CSS code I am working with:
HTML
<p class="deals-value"><span><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">CHF</span>157.00</span></span></p>
CSS
.deals-value .amount {text-decoration: line-through;}
.woocommerce-Price-currencySymbol {margin-right: 10px;}
You can view the full html/css source and website here: