Hi,

I'm working on a project concerned with legislation and one of the requirements is to format some of the data exactly as it appears in the appropriate statute. Basically this means that level one ordered lists should number (1), (2), (3) etc; level two ordered lists should go (a), (b), (c) etc, and level three should go (i), (ii), (iii) etc.

For an idea of what I mean, for levels one and two anyway, take a look at:

http://www.legislation.gov.uk/ukpga/1998/24/section/2

The chapter number on that page can be ignored. I just need the internal contents. Interestingly, the site above does not use lists to format the data, so my question - below - might be something of a forlorn hope: but I thought I'd ask anyway, since the data is going to have to be entered by end users (after my contract has finished) using an HTML editor like TinyMCE and I'm not looking forward to having to train them in how to do that properly if we have to finish up with a solution such as the one used on the UK Government site above. I guess I would have to train them to edit the HTML produced by the editor in order to allocate the correct classes to things: maybe even to add elements like <span> and so on. Nightmare.

I know that it's possible to use standard CSS to do the following:

  1. First level item 1
  2. First level item 2
  3. First level item 3
        1. Second level item 1
        2. Second level item 2
              1. Third level item 1
              2. Third level item 2
              3. Third level item 3
        3. Second level item 3
  4. First level item 4

<style>
ol {
list-style-type: decimal;;
}

ol ol {
list-style-type: lower-alpha;;
}

ol ol ol {
list-style-type: lower-roman;
}
</style>
</head>
<body>
<div>
<ol>
<li>First level item 1</li>
<li>First level item 2</li>
<li>First level item 3
<ol>
<li>Second level item 1</li>
<li>Second level item 2
<ol>
<li>Third level item 1</li>
<li>Third level item 2</li>
<li>Third level item 3</li>
</ol>
</li>
<li>Second level item 3</li>
</ol>
</li>
<li>First level item 4</li>
</ol>
</div>
...

The problem, of course, is that the parentheses are missing. Is there any way I can use CSS to include the parentheses or am I stuck with the standard list style types? Or is there some other magic I can use?

Given the alternative, I might be able to persuade my customers to settle for the standard CSS, but I'm trying not to give up without a fight. So any suggestions would be most gratefully received.

Thanks in advance.



Peter

--
http://www.peredur.net

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to