Kim Andersen Kim Andersen - 10 months ago 30
CSS Question

Change bullets color of an HTML list without using span

I was wondering if there is a way to change the color on the bullets in a list.

I have a list like this:


It is not possible for me to insert anything in the li's such as a 'span' og a 'p'. So can I change the color of the bullets but not the text in some smart way?


If you can use an image then you can do this. And without an image you won't be able to change the color of the bullets only and not the text.

Using an image

li { list-style-image: url(images/yourimage.jpg); }



Without using an image

Then you have to edit the HTML markup and include a span inside the list and color the li and span with different colors.