Topic: Backward ordered lists in CSS (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11014" title="Pages that link to Topic: Backward ordered lists in CSS (Page 1 of 1)" rel="nofollow" >Topic: Backward ordered lists in CSS <span class="small">(Page 1 of 1)</span>\

 
Kartis Shone
Nervous Wreck (II) Inmate

From: Malmö, Sweden
Insane since: Mar 2002

posted posted 07-21-2003 03:47

When cleaning up the code for an old site I've made for a composer, and remaking it to a CSS-based strict html, I've come to the page with a long list of compositions. The list has been ordered from 1 to a few hundred, counting from the first work composed.

On the new, clean version of the site, I would like to order the list backwards, as it is supposed to be listed. That is, work no.1 composed in 1979 should be last on the list, and latest composed work should be on the top of the page, with the number it gets (like 135 or something).

When reading about lists in my html book, it says backward lists are not yet possible in html. The chapter with CSS doesn't mention anything about it. It is Osborne / The Complete Reference HTML Third Edition and it was printed in 2001.

My question is: Since so much has happened with html and CSS since 2001, does any of you guys know if a backward ordered list has been implemented in html and CSS? And if so, how do I code it?

(And - of course I have searched through W3C's site to find any information about this, but found nothing so far. I will search a little more and come back here to tell if I found anything myself...)

Edit: I am absolutely not asking for a site review for the site on the above link. The coding stinks, and there are many things on it that is NOT well done. That's why I have a major cleaning-up work with it.

Kasta sten i glashus? Jag?

[This message has been edited by Kartis Shone (edited 07-21-2003).]

synax
Maniac (V) Inmate

From: Cell 666
Insane since: Mar 2002

posted posted 07-21-2003 04:22

As far as I know decending ordered lists haven't been implemented in CSS or HTML. However, if the list you're working with is a few hundred items long, you probably wouldn't want to do it by hand anyway.

Your best probable solution would be to use some kind of script (Javascript, PHP, Perl, ASP or otherwise) to do the counting and numbering for you.

Kartis Shone
Nervous Wreck (II) Inmate

From: Malmö, Sweden
Insane since: Mar 2002

posted posted 07-21-2003 04:36

Thanks synax! That is an idea I didn't even think of. Mostly because I haven't learned the languages very good yet. I did some javascripting, but I can't say that I know it. I will have a look into how I can solve it though.

Right now I have put in <li> for each work on the list, and that wasn't too much of a problem, besides the fact it doesn't work descending.

Kasta sten i glashus? Jag?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-21-2003 06:46

Although it is possible to make a list count in descending order, I'm not sure that it's possible to specify where it *starts* counting from (I think that's stuck at zero). Even if there is, I can pretty much guarantee that browsers don't support these features yet - at least not IE.

Don't rely on JavaScript to handle the numbering if it's important that the numbers be there. Otherwise, people with JavaScript turned off won't see the numbers. I'd suggest using a server-side language instead, or maybe just doing it by hand, depending on how long the list is and how much control you need over it.

Kartis Shone
Nervous Wreck (II) Inmate

From: Malmö, Sweden
Insane since: Mar 2002

posted posted 07-21-2003 13:16

Slime, so you mean it is possible to make a list descending? My list will start counting on 1, the first object. But the first object will be at the bottom of the page. And the object with the highest number will be on top of the page.
Sure, I can write the numbers by hand, but that doesn't seem to be a very smart idea, if there are systems that can take care of the counting. What if the composer suddenly wants to put in a work he made in 1987 - in the middle of the list - that he didn't have on the list before? Then I have to rewrite every number from 1987 until now. Bulky. And also if some of the composed works have to change places because I put them wrong for some reason?

The composer composes new compositions (heh) all the time, like 4-10 every year. They all should go into the list, and should be easy to put in, without putting numbers manually in front of them. He wants them counted. It's a kind of sport, I think, like counting how many websites you have made in your life.

The list is pretty long, from 1979 until 2002 there are so far 135 works. I haven't received the last ones from him, and I think he has more works from during the past years that he wants to put in. I would guess it is about 150-200 works altogether. And the list is growing all the time.

Are there so many people with JavaScript turned off? I thought most people have machines that can handle JavaScripts nowadays. Anyway, I guess that PHP or Perl will be the deal for me - IF there isn't a good way of making a descending list in html. Any hints on how I could start working with it?

Kasta sten i glashus? Jag?

synax
Maniac (V) Inmate

From: Cell 666
Insane since: Mar 2002

posted posted 07-21-2003 18:59

Personally, I'd try it with PHP. If you want to try it with PHP or Perl (or another ser-side language), then head on over to the Server-Side Scripting forums and ask for some pointers there.

Kartis Shone
Nervous Wreck (II) Inmate

From: Malmö, Sweden
Insane since: Mar 2002

posted posted 07-21-2003 21:03

Thanks, synax, I will!

Kasta sten i glashus? Jag?



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu