I have an HTML ordered list, that I need to apply a strikethrough to. I have done this in CSS as below:
.Lower-Alpha {
list-style: lower-alpha;
margin-top: 2pt;
margin-bottom: 2pt;
text-decoration: line-through;
}
The issue I am having is that this strikes through the content in the list, but not the number of the list (and I need to do both).
Eg I am getting:
a. struckthrough content
but I need:
a. struckthrough content
Any suggestions welcome. Cheers
Complete HTML/CSS Course 2022 To mark strikethrough text in HTML, use the <strike>… </strike> tag. It renders a strikethrough text.
The <strike> tag was used in HTML 4 to define strikethrough text.
The start value of an ordered list in HTML5 can be specified by implementing the HTML <ol> start Attribute and passing the starting value (number) as the value to the attribute.
easy as pie: list-style-position: inside;
http://jsfiddle.net/seler/NWbrR/
edit: it looks like it's browser dependent behaviour. in mozilla it renders ok.
edit2: for full browser compability u can use this js script: http://jsfiddle.net/seler/32ECB/
@Haem; You can apply :after
property
li:after{
border-top:1px solid red;
display:block;
content:"";
margin-top:-8px;
}
check the fiddle for more may be that's help you
http://jsfiddle.net/sandeep/NWbrR/4/
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