There are Javascript Table of Content (TOC) scripts out there
that can do this. Problem is, they don't work if Javascript isn't
available.

CSS 2.1 introduced support for this with list counters. Problem
is, many browsers don't support list counters.

I have a purely server-side (PHP) solution that works well. In
fact, I've been meaning to put together an article on how I
built it. With one or two PHP functions, and a data structure
that represents your table of contents, you can build them
very easily. It also allows you to abstract the entire structure
of the page and insert links to any section of the document.

Have a look at:

http://loadaveragezero.com/hnav/help.php

for a fairly complex example of a nested TOC like this. If you
view the PHP source, you can see how it works.

http://loadaveragezero.com/src/view/hnav/help.php

For you validity fans, the results are XHTML 1.1.

Doug

> From: Daniel Nitsche <[EMAIL PROTECTED]>
> Date: Wed, 21 Sep 2005 21:31:50 +1000
> Subject: Re: [WSG] <ol> displaying 3.1 3.2 etc. instead of 1 2 3
>
>
> There is something on this very topic in the WCAG:
>  http://www.w3.org/TR/WCAG10-HTML-TECHS/#lists
>
>  Cheers,
>
>  Daniel Nitsche
>
> On 9/21/05, Taco Fleur - Pacific Fox <[EMAIL PROTECTED]> wrote:
> >
> > Is there any way to make list look like
> >
> > 3.1 text text
> > 3.2 text text
> > 3.3 text text
> > 3.4 text text
> >
> > Instead of
> >
> >
> > 1 text text
> > 2 text text
> > 3 text text
> > 4 text text
> >
> > I am thinking NOT with plain markup, but I could be wrong (just checking).
> >
> > And how would someone else do this? Just use <ul> and put the numbering
> within the list item as text?

--
Douglas Clifton
[EMAIL PROTECTED]
http://loadaveragezero.com/
http://loadaveragezero.com/app/s9y/
http://loadaveragezero.com/drx/rss/recent
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to