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:44 am (UTC)
From: [identity profile] mobbsy.livejournal.com
Does this help?

http://www.w3.org/TR/REC-CSS2/generate.html#counters

Date: 2004-05-13 02:54 am (UTC)
ext_22879: (Default)
From: [identity profile] nja.livejournal.com
See my first comment above - this is CSS2 and it would be very nice if browsers supported it, but they don't. There are some lovely things you could do using the :before and :after selectors, and things like "li + li + li" to select the third item in a list, but they just don't work with current browsers.

Date: 2004-05-13 03:16 am (UTC)
From: [identity profile] mobbsy.livejournal.com
Hm… googling around a bit, it does appear to be a bit of CSS2 that nothing except Opera currently supports. Ho-hum.

Actually, I'm bored enough to install no-cost version of Opera and test the sample code from W3C.
<clickity-click>

Yep, that appears to do exactly what [livejournal.com profile] j4 wants, using an open standard that's supported on precisely one web browser that few people use.

Date: 2004-05-13 04:12 am (UTC)
From: [identity profile] j4.livejournal.com
This, AFAICTSF, is the main problem with stylesheets -- you can theoretically do shedloads of really funky stuff with them, but the funky stuff is generally only supported on only one browser (and not always the same one, though usually Opera or NS7) if any.

Grrrr.

Date: 2004-05-13 04:29 am (UTC)
From: [identity profile] mobbsy.livejournal.com
They're getting there, but very slowly. I've no idea why it takes so long for web standards to be implemented in browsers.

Just noticed that it was CSS2 (http://www.w3.org/TR/REC-CSS2/)'s 6th birthday yesterday. Happy belated birthday, CSS2. I hope somebody starts paying attention to you soon.

Date: 2004-05-13 05:25 am (UTC)
From: [identity profile] huskyteer.livejournal.com
I've just bought the O'Reilly CSS book (Two Fish). Eric Meyer has a lovely habit of spending six pages telling you a really neat CSS trick, only to note in a box at the end that it won't work in IE...

Date: 2004-05-13 05:45 am (UTC)
ext_22879: (Default)
From: [identity profile] nja.livejournal.com
What's depressing about Lie and Bos (http://www.amazon.co.uk/exec/obidos/ASIN/0201596253/qid=1084452160/sr=1-11/ref=sr_1_2_11/202-1495803-0666246)'s book, published five years ago, is that most of what they describe wouldn't work in the "big two" browsers back then, and still doesn't.

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 04:58 pm
Powered by Dreamwidth Studios