5 replies [Last post]
gadgetboy1
Offline
newbie
Last seen: 13 years 42 weeks ago
Joined: 2007-11-28
Posts: 6
Points: 0

Is it possible to use CSS to change the colour of a bullet point so that it differs from the associated text or is the only way to use a graphic?

Basic question, I know but it is driving me nuts :curse:

Cheers

Paul

p.s. I did search the forum first - honest :thumbsup:

DanA
DanA's picture
Offline
Elder
Last seen: 11 years 30 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

It is possible. Style a span

It is possible.
Style a span with the needed colour around the associated text. The bullet will have the default colour.

gadgetboy1
Offline
newbie
Last seen: 13 years 42 weeks ago
Joined: 2007-11-28
Posts: 6
Points: 0

Thanks DanA

Thanks for your advice.

Great solution and one in the eye for a couple of my local web design friends who said it wasn't possible :thumbsup:

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Well technically it's not

Well technically it's not possible so if you asked the question as to changing the bullet colour they were right, the advice given was for styling the general li item and then changing the contents of a span.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 9 years 10 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

Hugo wrote:Well technically

Hugo wrote:
Well technically it's not possible so if you asked the question as to changing the bullet colour they were right, the advice given was for styling the general li item and then changing the contents of a span.

Not wholly right, Gecko browsers can do it.

li:-moz-list-bullet { style properties }

http://developer.mozilla.org/en/docs/CSS::-moz-list-bullet

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Oh Chris! I'm grasping for a

Oh Chris! I'm grasping for a phrase here, er something to do with being clever along with some guys name or is it part of the body Smile

Anyways it don't count coz it's got that thingy at the front '-'

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me