+ 1
How can i do the equivalent of start at for an ordered list using css
I want to be able to make an ordered list of class special-list start at 5. While i know i can do so using html <ol start=5> I want to know if I can do so using only css. Something like <ol class="special-list"> And in head or another css file .special-list { start:5 } Or same other term as start is not recognized in css
1 Réponse
+ 2
ol.special-list {
list-style: none;
counter-increment: start 4;
margin-left: -16px;
}
ol.special-list > li:before {
content: counter(start, number) ". ";
counter-increment: start;
}
https://code.sololearn.com/WbQ71P4F9E09/?ref=app