SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: List Numbering
-
Mar 22, 2007, 11:40 #1
- Join Date
- Aug 2005
- Posts
- 0
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
List Numbering
I've got a list that needs to be numbered, and also have sub lists that are numbered, however I've got a slight problem in the way that the lists are being numbered.
Currently they are numbered as follows:
1. List Item One
1. Sub-list Item One
2. Sub-list Item Two
2. List Item Two
1. Sub-list Item One
1. Sub-sub-list Item One
2. Sub-list Item Two
3. List Item Three
1. Sub-list Item One
2. Sub-list Item Two
1. List Item One
1.1. Sub-list Item One
1.2. Sub-list Item Two
2. List Item Two
2.1. Sub-list Item One
2.1.1. Sub-sub-list Item One
2.2. Sub-list Item Two
3. List Item Three
3.1. Sub-list Item One
3.2. Sub-list Item Two
HTML Code:<ol> <li>List Item One</li> <ol> <li>Sub-list Item One</li> <li>Sub-list Item Two</li> </ol> <li>List Item Two</li> <ol> <li>Sub-list Item One</li> <ol> <li>Sub-sub-list Item One</li> </ol> <li>Sub-list Item Two</li> </ol> <li>List Item Three</li> <ol> <li>Sub-list Item One</li> <li>Sub-list Item Two</li> </ol> </ol>
-
Mar 22, 2007, 12:50 #2
- Join Date
- Dec 2002
- Location
- Aylmer, QC, Canada
- Posts
- 409
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It should be like this
Code:<ol> <li>List Item One <------------ note the </li> closed below <ol> <li>Sub-list Item One</li> <li>Sub-list Item Two</li> </ol></li> <------------------- here <li>List Item Two <ol> <li>Sub-list Item One <ol> <li>Sub-sub-list Item One</li> </ol></li> <li>Sub-list Item Two</li> </ol></li> <li>List Item Three <ol> <li>Sub-list Item One</li> <li>Sub-list Item Two</li> </ol></li> </ol>
-
Mar 23, 2007, 00:29 #3
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You can't achieve list numbering like 1.1 using HTML only. It's a presentational matter, so it should be controlled via CSS. Unfortunately few browsers support CSS 2.1 to this extent; I know Opera does, and I think Safari does too, but AFAIK that's it.
Birnam wood is come to Dunsinane
-
Mar 23, 2007, 08:19 #4
- Join Date
- Dec 2004
- Location
- Sweden
- Posts
- 2,670
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
(Firefox supports counters too, since 1.5.)
Simon Pieters
-
Mar 23, 2007, 21:04 #5
- Join Date
- Mar 2005
- Location
- USA
- Posts
- 5,482
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
And Konqueror 3 (I still haven't tested it in 3.3 yet) but not Safari 2.0.
From the thread karinne linked to:
Originally Posted by Kravvitz
We miss you, Dan Schulz.
Learn CSS. | X/HTML Validator | CSS validator
Dynamic Site Solutions
Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.
Bookmarks