tags:

views:

97

answers:

3

Hello all,

I have an ordered list (ol) on my page but the numbering is not showing up at all! I have done this:

<ol>
<li>my text</li>
<li>my text</li>
<li>my text</li>
</ol>

As I have typed the above, stackoverflow was able to render it correctly the way I wanted it to, like so:

  1. my text
  2. my text
  3. my text

However, this is not happening on my webpage. I am viewing this in Firefox on my localhost.

If any knows why my ol's look like ul's (i.e. no numbering) I would be grateful for help. If not, please let me know how I can achieve a numbered list using ul's.

Thanks all

+1  A: 

It's going to be a CSS issue. CSS can change the numbering/bullet style, and even turn it off altogether. Using Firebug, inspect the element and look at the CSS styles on the right to see what styles are being applied to it. Look for one called list-style.

nickf
I have used firebug to have a look at any properties it inherits but they are not things that can affect the ol! I have looked for `list-style` especially but nothing! :(
Abs
Ah, I found it. I was only looking for styles of ol/ul not the li themselves! Thanks nickf!
Abs
A: 

Try list-style-type: decimal; in your CSS for the ol.

Here's some more values you can use.

Brandon
+2  A: 

While the list-style-type is most likely the problem, especially if you've used a reset stylesheet, you might also make sure that the margin-left/padding-left of the list is large enough that the numbers can fit into the space.

Also, it might be worth adding list-style-position: inside; just to see if the numbers are being generated/applied by the browser.

David Thomas