WordPress.org

Ready to get started?Download WordPress

Forums

OL in reverse order? (7 posts)

  1. Nick Momrik
    Member
    Posted 10 years ago #

    Is there any way to number a OL in reverse order? I haven't been able to find anything, but it seems like it should be an option, semantically!
    Thanks!
    -Nick

  2. Stevarino
    Member
    Posted 10 years ago #

    I checked it out too (it would be perfect for weblogs, given their reverse chronological order), and didn't find anything. The closest thing I could find was this spec, which is HTML 4.0 and anything interesting has been deprecated (meaning it has probably been cut out in xhtml)... Darn.

  3. Nick Momrik
    Member
    Posted 10 years ago #

    There could be a lot of uses for it!
    I was planning to use it (if I could find something) for a top ten list, which is usually in reverse order from 10 to 1. I guess I'll have to use OL with list-style: none; and then add my numbers inside the LI.

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    There isn't currently a way to have ordered lists "count down" as you want, either in CSS or in HTML attributes (which would be deprecated anyway), so yes, I'd just go with an unordered list and manually add the numbers. If you use
    < ul>
    < li >< span > 10. < /span > The rest of the LI text< /li >
    < li >< span > 9. < /span > The rest of the LI text< /li >
    < li >< span > 8. < /span > The rest of the LI text< /li >
    < ! -- etc. -- >
    < /ul >
    you can use padding on the span (or margin, not sure which will work without testing) to put some space between the "bullet" and the LI text.
    Or, you could create a bunch of images of numbers and use them as background images for the LIs

  5. Stevarino
    Member
    Posted 10 years ago #

    IDEA! Try this!!!
    http://www.w3.org/TR/REC-CSS2/generate.html#counters!
    That should work, although you now have to worry about browser support

  6. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    Yep, the way to do this is with CSS and counters. Not the easiest way, but the best. ;)

  7. Stevarino
    Member
    Posted 10 years ago #

    Ouch, it's worse than I thought! Not even Gecko browsers support this, only Opera from 4.0 on it seems.
    http://www.blooberry.com/indexdot/css/supportkey/generate.htm
    Eh, it was worth a try...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.