tags:

views:

371

answers:

3

Hello Stack Overflow,

I am attempting to figure out how to create incremented lists with IE6/IE7.

E.G. It should look something like below:

1.0
    1.1
    1.2
    1.3
2.0
    2.1
    2.2

From what I understand, this is possible to create in CSS with something like this:

UL, OL { counter-reset: item; }
LI { display: block }
LI:before { content: counters(item, "."); counter-increment: item }

However, of course, IE6 and IE7 don't support this.

What options are available to create a proper incremented list in IE6/7? Am I stuck having to hard code this.? Unfortunately, using javascript is not an option.

Thanks for any solutions.

A: 

If javascript is not an option (and therefore also I assume no flash), I'm sorry to say you're out of options for a client-side solution. If you have a server-side script that is generating your HTML, you can push the ordering to the server and simply style the output on the client using CSS as an unordered-list with no bullet. IE6 is your limiting factor here, and there aren't many ways around that. Sorry to be the bearer of bad news.

Jarret Hardie
A: 

If JavaScript is not an option, you will have to hard code it/implement it on the server side.

The positive side is: It will work for other less capable user agents/devices (think BlackBerry Browser etc) right away.

Tomalak
+1  A: 

XSLT (including XSLT 1.0) can generate multi-level numbering sequences with <xsl:number>.

Richard
This looks like a possibility since the final output is XHTML 1.0 strict. Thanks all for the quick responses. Any other suggestions will be more than happily considered.
Martin M