2

Possible Duplicate:
How to define the Color of Bullets in UL/LI Lists via CSS, WITHOUT using any image bullets or any span tag?

how can change the color of the list-style circle using css

my css is:

 ul{
   list-style:circle;
 }
Community
  • 1
  • 1
Suresh Pattu
  • 31
  • 1
  • 1
  • 3

3 Answers3

7

try this.

    <ul>
    <li><span>text</span></li>
    </ul>

    ul li {
       list-style:circle;
       color:blue;
     }

    ul li span {
       color:#000;
     }
Mr.T.K
  • 2,318
  • 6
  • 26
  • 42
3

There is:

ul {
    list-style:circle;
    color:blue;
}

For other font color additionally do this:

ul span {
    color:black;
}

and html:

<ul>
    <li><span>This is a black line</span></li>
</ul>
Thomas
  • 1,444
  • 1
  • 13
  • 25
1

The answer in the topic Soufiane Hassou mentioned is the best way to go, but if you don't mind using spans in the li, you could use:

ul
    {
        list-style: circle;
        color: #FF0000;
    }

    ul span
    {
        color: Black;
    }

Where the HTML is:

<ul>
    <li>
        <span>Test-text</span>
    </li>
</ul>

This will mark the bullet red, but the text Black.

Pbirkoff
  • 4,642
  • 2
  • 20
  • 18