0

Possible Duplicate:
Change bullets color in a list without span

Is it possible to change the bullet color in a list without using span class and image ?

html:

<ul>
    <li>java</li>
    <li>oracle</li>
    <li>php</li>
    <li>mysql</li>
</ul>

Note: I don't want to use <span> in between <li>.

Community
  • 1
  • 1
RAN
  • 1,443
  • 3
  • 19
  • 30
  • You can use the list-style-image [list-style-image](http://www.w3schools.com/cssref/pr_list-style-image.asp) property – scumah Jun 19 '12 at 10:36

2 Answers2

1
li:before {
    content: "• ";
    color: red; /* or whatever color you prefer */
}
Prashobh
  • 9,216
  • 15
  • 61
  • 91
0

In my knowledge it is the method to color the bullets without using span.

css:

li {
          list-style: none;
        }

        li:before {
          /* For a round bullet */
          content:'\2022';
          /* For a square bullet */
          /*content:'\25A0';*/
          display: block;
          position: relative;
          max-width: 0px;
          max-height: 0px;
          left: -10px;
          top: -0px;
          color: red;
          font-size: 20px;
        }

html:

<ul>
        <li>java</li>
        <li>oracle</li>
        <li>php</li>
        <li>mysql</li>
      </ul>
RAN
  • 1,443
  • 3
  • 19
  • 30