All I want is to be able to change the color of a bullet in a list to a light gray. It defaults to black, and I can't figure out how to change it.
I know I could just use an image; I'd rather not do that if I can help it.
All I want is to be able to change the color of a bullet in a list to a light gray. It defaults to black, and I can't figure out how to change it.
I know I could just use an image; I'd rather not do that if I can help it.
For a 2008 question, I thought I might add a more recent and up-to-date answer on how you could go about changing the colour of bullets in a list.
If you are willing to use external libraries, Font Awesome gives you scalable vector icons, and when combined with Bootstrap's helper classes (eg.
text-success
), you can make some pretty cool and customisable lists.I have expanded on the extract from the Font Awesome list examples page below:
Font Awesome (mostly) supports IE8, and only supports IE7 if you use the older version 3.2.1.
Hello maybe this answer is late but is the correct one to achieve this.
Ok the fact is that you must specify an internal tag to make the LIst text be on the usual black (or what ever you want to get it). But is also true that you can REDEFINE any TAGS and internal tags with CSS. So the best way to do this use a SHORTER tag for the redefinition
Usign this CSS definition:
And this html code:
You get required result. Also you can make each disc diferent color:
You can use Jquery if you have lots of pages and don't need to go and edit the markup your self.
here is a simple example:
I managed this without adding markup, but instead using li:before. This obviously has all the limitations of
:before
(no old IE support), but it seems to work with IE8, Firefox and Chrome after some very limited testing. It's working in our controller environment, wondering if anyone could check this. The bullet style is also limited by what's in unicode.This was impossible in 2008, but it's becoming possible soon (hopefully)!
According to The W3C CSS3 specification, you can have full control over any number, glyph, or other symbol generated before a list item with the
::marker
pseudo-element. To apply this to the most voted answer's solution:JSFiddle Example
Note, though, that as of July 2016, this solution is only a part of the W3C Working Draft and does not work in any major browsers, yet.
If you want this feature, do these:
Trident (IE, Windows web views): Click "I can too" under "X User(s) can reproduce this bug"Trident development has ceased
You could use CSS to attain this. By specifying the list in the color and style of your choice, you can then also specify the text as a different color.
Follow the example at http://www.echoecho.com/csslists.htm.