j4: (dodecahedron)
[personal profile] j4
Okay, this may be a dumb question, but is there a way in XHTML/CSS to create a nested ordered list like this:

1. a list with some stuff in:
        1.1 stuff here
        1.2 more stuff
        1.3 guess what, a nested list:
                1.3.1 stoat
                1.3.2 weasel
                1.3.3 badger
        1.4 no list here

2. another list, or whatever


etc.?

I have looked in all the usual places and they all seem to say "no, can't be done", but you guys are clever...

Update: I really do mean with the numbering as above (1, 1.1, 1.1.1 etc.) not just nested lists in general -- sorry for not being more clear. And it looks like the answer's "no" anyway. :-/

Date: 2004-05-13 02:17 am (UTC)
ext_22879: (Default)
From: [identity profile] nja.livejournal.com
The quick answer's no. The long answer is that if browsers supported CSS2 properly, you could specify text to be inserted before each instance of an element, and you could probably use scripting to get the current list level and insert the appropriate text. In fact that might still be possible, but using JavaScript to simulate this would be very, very messy. And since there are no tabs in HTML, it would look messy as well, with a proportional font. The answer's probably to use <pre>
blocks, as above. You could knock up a Perl script to automatically generate the item numbering.

June 2025

S M T W T F S
1234567
891011121314
15 161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 28th, 2026 10:49 pm
Powered by Dreamwidth Studios