Changing color of numbers in ordered list (3 posts)

  1. Avenir
    Posted 10 years ago #

    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.

  2. Kafkaesqui

    Posted 10 years ago #

    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>

  3. Avenir
    Posted 10 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.