Lets say I have a simple list like so:
- one
- two
&l
The counters section in CSS 2.1 specifications contains various examples of how to implement your custom counter. Here is a very simple example where you:
.count elements).custom-counter {
/* define a counter variable */
counter-reset: clumsycount 0;
/* style */
list-style-type: none;
}
.custom-counter .count {
/* increment the counter variable */
counter-increment: clumsycount 1;
/* style */
position: relative;
background-color: #EEE;
}
.custom-counter .count:before {
/* display the counter variable */
content: counter(clumsycount) ".";
/* style */
position: absolute;
top: 0;
right: 100%;
padding-right: .25em;
background-color: #CCC;
}
- one
- two
- three
- four
- blabla
- five
- six
- blabla
- seven