AnC
AnC

Reputation: 4201

changing decimal prefix/suffix in numbered lists

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

Upvotes: 1

Views: 653

Answers (2)

SteD
SteD

Reputation: 14027

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>

Upvotes: 1

Nasser Hadjloo
Nasser Hadjloo

Reputation: 12610

you can use

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

to control it

Upvotes: 0

Related Questions