Question

Is it possible to lose the dot when using "list-style-type:decimal-leading-zero;"

I found a solution to lose the dot, but then I can't add the leading zero.

ol { 
    counter-reset: item;
    list-style-type: decimal-leading-zero;
}
li { display: block; }
li:before { 
    content: counter(item) "  "; 
    counter-increment: item 
}
Was it helpful?

Solution

You can set the list-style-type for the counter:

ol { 
    counter-reset: item;
    list-style-type: none;
}
li { display: block; }
li:before { 
    content: counter(item, decimal-leading-zero) " "; 
    counter-increment: item;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top