I added the !important
tag to the line-through styling in Google Chrome but it didn’t seem to work. Is there a solution or a work around that could solve this issue?
The <del>
tag carries the line-through or strike-through styling by default, and you may use it directly to strike-through the text in your markup.
The following CSS should be used to give a separate element the line-through styles (eg. <span>
, <div>
etc.):
.line-through {
text-decoration: line-through;
}
And in the markup, you may use the above defined CSS as:
<span class="line-through">Deleted text</span>
The above mentioned examples work seamlessly on every browser without adding an !important with the styles. Check out this fiddle for a quick demo. Please share your code if possible, would be helpful to figure out the actual problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With