3

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 
}
BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
user1603310
  • 35
  • 1
  • 3
  • possible duplicate of [HTML + CSS: Ordered List without the Period?](http://stackoverflow.com/questions/5945161/html-css-ordered-list-without-the-period) – brandonscript Apr 04 '14 at 07:57

1 Answers1

10

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;
}
Roland Jansen
  • 2,733
  • 1
  • 16
  • 21