How can I make a strikethrough line go more down for example
<p style="text-decoration: line-through;">HELLO</p>
View my fiddle for images because I need 10 reputation to post images.
How can I make a strikethrough line go more down for example
<p style="text-decoration: line-through;">HELLO</p>
View my fiddle for images because I need 10 reputation to post images.
You can not do it with the strikethrough. one of my project I have same requirement, I have done it with some css trick but this is not good practice.
html
<div>HELLO<hr/></div>
css
div{
position:relative;
display:inline-block;
}
hr{
position:absolute;
top:11px;
left:0;
display:inline-block;
width:100%;
}
If your text is only one line, this will work:
http://jsfiddle.net/delvarworld/KmE4q/
html:
<stricken>HELLO</stricken>
sass:
stricken {
position:relative;
&:after {
content:"";
position:absolute;
left:0;
right:0;
top:32px;
height:4px;
background:#000;
display:block;
}
}
If your text is multiple lines, you would need to wrap each line in a <striken>
tag, and not rely on browser word wrapping.
text-decoration:line-through; doesnt support the positioning of line. So, we cant do any change in that, it deppends on font as well. Possibly as a solution what we can do is to replace line with border and position it according to your needs
.center:after {
border-top: 1px solid #000;
position: absolute;
content: "";
right: 0;
top:65%;
left: 0;
}
Refer this:-