PDA

View Full Version : LI bullet color


ShMiL
04-04-2003, 08:17 PM
Can I choose the color for the bullets in lists (without affecting the color of the text between the <li> and the </li>)?
Thanks...

Tails
04-04-2003, 08:22 PM
I don't know if you can just change the color, but you can do better. You can assign images. Try this:

<style>
li{list-style-image:url("pic.gif")}
</style>

A working example is here: http://XFox_Prower.tripod.com/updates.htm

32x32 should be the limit for bullet sizes. And remember that nested List Items can have other images like so:

<style>
li ul li{}
</style>

ShMiL
04-04-2003, 09:04 PM
I knew that, but thought there was a way to color the bullets.
Thanks anyways.

zoobie
04-05-2003, 05:40 AM
<span style="color:red">&amp#149;</span> :D

cg9com
04-05-2003, 08:44 AM
i think the best way would be just to color the text different from the ul,li coloring via inline CSS, pretty primitive but i dont think there is another solution.

bazz
04-06-2003, 01:52 AM
yup. you could do it as cg9com suggests but I would do it using a separate .css style sheet. Then if you decide to change the colours either on one page or throughout the site, you can do it with one change. :p

ShMiL
04-06-2003, 04:54 AM
I did what cg9com suggested - thanks.
If we're talking about lists, I thought it'd be ok to ask another question here:
Is it possible to change the size of the bullet? (without using images)

Thanks.

beetle
04-06-2003, 07:24 PM
The size of the bullet is controlled by the font-size of the LI

ShMiL
04-06-2003, 07:45 PM
great
thanks!

ShMiL
04-10-2003, 05:42 PM
Originally posted by beetle
The size of the bullet is controlled by the font-size of the LI
I just found the time to check your advice and i'm afraid your'e wrong...
I still can't find a way to affect the size of the bullets.

beetle
04-10-2003, 05:52 PM
Hmm. You're right. I assumed that would be the case since the style of the LI is what applies the the bullet (such as color)

It seems this is an IE-only "bug" for <ul> elements, as Opera 7 and Mozilla both resize the bullet properly.

ShMiL
04-10-2003, 05:58 PM
So, there is no way of resizing the bullets (in IE)?!

beetle
04-10-2003, 05:59 PM
I'm searching Google and MSDN, but I haven't found anything yet :(