Forum Moderators: open

Message Too Old, No Replies

Ordered List numbering

Can I start it at something other than one

         

GuanoLad

6:31 am on Oct 17, 2002 (gmt 0)

10+ Year Member



I have a long list on my website that is very convenient to be numbered, as I add entries to it weekly, but alphabetically (not numerically).

Anyways, the list is getting way too long now (over 100 entries) and I'd love to be able to break up the list into columns - but that would mean the Order numbers would reset to 1 for each new column, which is inconvenient.

Is there a way (in CSS perhaps?) to begin the second column with a number other than 1? Or maybe a way to break up the list into columns without interrupting the numbering?

I fear not.

Purple Martin

9:00 am on Oct 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can think of one way, but you're probably not going to like this answer.

Put all your list items in a database (the database can be as simple as a plain text file). Use server-side scripting to read the items and build the HTML for your columns on-the-fly, adding numbering text in front of each item as it is processed.

SuzyUK

9:53 am on Oct 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yes, just specify <ol start="n"> at the start of a new column, where n is the number you want

i.e.
<ol>
<li>item one</li>
<li>item two</li>
<li>item three</li>
</ol>

<br><br>

<ol start="4">
<li>item four</li>
<li>item five</li>
<li>item six</li>
</ol>

Suzy
:)

GuanoLad

12:06 am on Oct 18, 2002 (gmt 0)

10+ Year Member



Thanks Suzy! I once looked this up on the net and found nothing. And this works perfectly!

Only... I hadn't anticipated having to change the number each time I add to column 1... Oh well ;)

piskie

12:50 am on Oct 18, 2002 (gmt 0)

10+ Year Member



Thanks Suzy, that helps me also.