I want to create HTML nested lists that has the following format:
1
1.1
1.2
1.3
1.4
2
2.1
I tried a solution that I f
This example uses IE6-specific CSS attribute behavior
to add a static marker before each li
. There must be some MS specific magic that can replace a static dash with a counter.
If you want it to be a CSS solution, use this as a starting point and then google "MSDN".
ul.example { margin: 0.5em 0; padding: 0 0 0 2em; }
ul.example li
{
margin: 0.5em 0; padding: 0 0 0 20px;
list-style-type: none;
behavior: expression( !this.before
? this.before = this.innerHTML = '— ' + this.innerHTML : '' );
text-indent: -1.24em;
}
ul.example li:before { content: '\2014\a0'; }