• Pretty much see the topic. I’d like to know how what CSS I should use to change the color of the numbers in an ordered list. I looked through the W3C specification on list-style and related tags but didn’t see anything relating to color. Thanks in advance for any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • A way to do this that’s valid XHTML is assign a ccs class to the ol that provides the color property for your numbers, then assign a class (of another color) to span tags within the li’s:

    <ol class="olcolor">
    <li><span class="licolor">List text 1</span></li>
    <li><span class="licolor">List text 2</span></li>
    </ol>

    Thread Starter Avenir

    (@avenir)

    Thanks Kaf! I hadn’t thought of doing something like that, but that does work. I wonder if there’s any easier way to do it? Ah well, your way works and that’s all I care about. Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing color of numbers in ordered list’ is closed to new replies.