Advertise with us

how to set ul/li bullet point color?

Hi!

Normally, the bullet point in ul/li is a black solid circle. I want to change the style of it, like I want to set the color of the bullet point to be green, I also want to change the bullet point to be a square. Anyone knows how to do that?

please give me right solution

Last updated:8/19/2013 8:19:48 AM

1 Answers

shreesh chandra shukla
shreesh chandra shukla

Hi!

A couple ways this can be done:

This will make it a square

ul
{
  list-style-type: square;
}
This will make it green
li
{
  color: #0F0;
}
This will prevent the text from being green
li p
{
  color: #000;
}

However that will require that all text within lists be in paragraphs so that the color is not overridden.

A better way is to make an image of a green square and use:

ul
{
  list-style: url(green-square.png);
}

Last updated:8/19/2013 8:19:48 AM

Answer