You can use text-decoration-color
, although browser support is spotty
s {
color: #4287f5;
text-decoration-color: #eb1515;
}
<s>Text</s>
You can use text-decoration-color
, although browser support is spotty
s {
color: #4287f5;
text-decoration-color: #eb1515;
}
<s>Text</s>
How can I change the color of the the strike-through line?
If I give the strike tag a class and then use CSS to change the color, it also changes the text color. I just want to change the color of the line and not the text.
h1 {
color: #4287f5;
}
.strike {
color: #eb1515;
}
<h1><s class="strike">£1000</s></h1>
It doesn’t work. It’s the same problem. Attaching a class to style the line also styles the text.
I think you need to re-read the question.
sure did … my bad, fixed
Can’t get it working on the browsers I need to use. Seems quite a basic oversight in html.