Question

I'm trying to create a "Purchase for ~$20~ $1" button (using Elementor).

I'm not sure how to achieve the strikethrough.

Also I would like the $1 to be in bold/red.

I suspect I need to dynamically replace the contents of the button using JS. But I'm not sure how to go about that or even if it's the best approach.

Alternatively I could use an image, I guess.

What would be a sensible approach?

Était-ce utile?

La solution

It turns out that it is possible to use custom HTML inside the text box when you enter the text for the button:

Special offer: <span 
    style="text-decoration:line-through">$20</span> <span 
    style="color:#f00">$1</span>
Licencié sous: CC-BY-SA avec attribution
Non affilié à wordpress.stackexchange
scroll top