Skip to content

Ordered list numbering workaround

Ordered list with descending numbers:

  • 5. Blue
  • 4. Green
  • 3. Purple
  • 2. Yellow
  • 1. Red

Here’s how it’s done…


Actually, it’s an unordered list. The span tag allows you to apply some local CSS magic and eliminate the bullets (the style=”list-style-type: none” part does that). Then you just number the list backwards yourself inside the list items. The code looks like this:

<ul> <span style="list-style-type: none">

<li>5. Blue</li>

<li>4. Green</li>

<li>3. Purple</li>

<li>2. Yellow</li>

<li>1. Red</li>

</span> </ul>

And now you’ve got a countdown list with only a little bit of extra typing and manual intervention.

The same thing will work if you start with an ordered list. The span and style will remove the automatic list numbering so you can manually number the list backwards.

UPDATE (04/13/07): The only way I could get the list work-around to work again was to do this:

<ul> 

<li style="list-style-type: none">5. Blue</li>

<li style="list-style-type: none">4. Green</li>

<li style="list-style-type: none">3. Purple</li>

<li style="list-style-type: none">2. Yellow</li>

<li style="list-style-type: none">1. Red</li>

 </ul>

The previous workaround should work for most people, but if your blog theme style overrides the span statement, try the second method with the style inside the list item.

One Comment

  1. Mike wrote:

    I just noticed that the bullets are showing up in the list. I suspect that upgrading to the new blog theme last week, introduced some CSS (cascading style sheets) code that interferes with the span statement.

    If a fix occurs to me, I’ll post it here.

    Wednesday, January 31, 2007 at 6:12 am | Permalink