Do you know why the line-through
text-decoration for :before
isn’t being overridden?
Demo: http://jsfiddle.net/FZJYW/
HTML
<p>Should be strike-through</p>
CSS
p {
text-decoration: line-through;
}
p:before {
content: "Should not be strike-through. ";
text-decoration: none !important;
}
Any ideas how to make only part of text line-through
without adding an extra element, like <span>
?
The <strike> HTML element places a strikethrough (horizontal line) over text. Warning: This element is deprecated in HTML 4 and XHTML 1, and obsoleted in HTML5. If semantically appropriate, i.e., if it represents deleted content, use <del> instead. In all other cases use <s> .
overline: It is used to display a line over the text.
Add display: inline-block
to the pseudo element's css properties
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