tags:

views:

74

answers:

1

Hi there

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

I have a list like this:

<ul>
   <li>House</li>
   <li>Car</li>
   <li>Garden</li>
</ul>

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?

+4  A: 

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); }

See

list-style-image

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.

rahul
Jep this could work. But actually I decided to use a background-image, and then a list-style-type: none; This gave me the freedom to position the "bullets" a little more than the list-style-image.But still you get the 1+ and right answer.
Kim Andersen