tags:

views:

28

answers:

2

Most browsers display ordered lists like this:

1. foo
2. bar
3. baz

Is there a way to change the numbering to use a prefix instead:

#1 foo
#2 bar
#3 baz
A: 

you can use

list-style-type: 
list-style-position: 
list-style-image: 

to control it

Nasser Hadjloo
I'm afraid that doesn't suffice; `list-style-type` only has a limited set of options, and how would you retain numbering with `list-style-image`?
AnC
@AnC - With `list-style-image` you can remove or replace default image if you like. I just mentioned it because of complete information. but in your case you can easily reach your goal with `style-type` and I think you have to use a `#` like image to put it inyour list, if you like to change the position.
Nasser Hadjloo
+1  A: 

Hi, this is the best I could come up with, only tested in Firefox and Chrome thou

<style>
  #hol-list li {
    list-style-position: inside; 
    list-style-type: decimal;
    position: relative;
  }

  #hol-list li:before {
    content: "\0023";
    position:absolute;
    left: -10px;
  }
</style>

<ol id="hol-list">
<li>first item</li>
  <li>second item</li>
  <li>third item</li>
</ol>
SteD
Thanks. I reckon that's the only way to do it - somewhat brittle, but it'll do.
AnC