Nested List Numbering

jmd

Usenet Archive
Joined
Feb 3, 2003
Messages
6
Reaction score
0
I tried making an outline-style list using nested UL's with generated content ":before" similar to what is shown in the CSS specification.

However, a side-effect is that you must change the LI's to display:block, and the numbering is inside the block, not hanging left. To work around that, I used the normal code for hanging indent (margin with the negative amount in text-indent) and that somehow jumps in much farther than specified in Firefox (not checked in another browser). What's going on?

But, even with that, I would not get the numbers to line up before the main block, like with a normal list item. The hanging indent would need to be a pre-determined amount and not reflect the actual size of the numbering.

Can CSS 2.1 do this properly?

--John
 

Nik Coughlin

Usenet Archive
Joined
Aug 16, 2004
Messages
444
Reaction score
0
JMD said:
I tried making an outline-style list using nested UL's with generated content ":before" similar to what is shown in the CSS specification.

However, a side-effect is that you must change the LI's to display:block, and the numbering is inside the block, not hanging left. To work around that, I used the normal code for hanging indent (margin with the negative amount in text-indent) and that somehow jumps in much farther than specified in Firefox (not checked in another browser). What's going on?

But, even with that, I would not get the numbers to line up before the main block, like with a normal list item. The hanging indent would need to be a pre-determined amount and not reflect the actual size of the numbering.

Can CSS 2.1 do this properly?

I don't know, but generated content won't work in IE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,051
Messages
3,104,251
Members
248,135
Latest member
tobystanx

Latest Threads

Top