PDA

View Full Version : List text different colour to bullet point


Ricky55
09-09-2008, 04:25 PM
Is there any way an unordered list bullet point can be a different colour to the text in the list without using an image for the bullet?

Thanks

Ricky55

domedia
09-09-2008, 06:26 PM
Nope :-) Only cross browser way is to use a little image for the bullet or a background-image

Cary
09-10-2008, 11:52 PM
I haven't tried this in FF2 or IE 6, but it works in FF3, IE7, Opera and Safari... If this is what you have in mind... If it's a list of links then the span tags won't be necessary.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
li {
color: #0066CC;
}
li span {
color: #CC6600;
}
</style>
</head>
<body>
<ul>
<li><span>item 1</span></li>
<li><span>item 2</span></li>
<li><span>item 3</span></li>
</ul>
</body>
</html>

domedia
09-11-2008, 03:31 PM
I think I've seen this approach before, so I wouldn't be surprised if it worked.
But I wonder if it's not better to let the stylesheet handle style issues like this, instead of adding extra elements to your HTML just for presentation.

Smish
07-05-2011, 09:31 AM
Help, my client is determined to open the dreamweaver HTML docs ion word and send from there, but the bullet i have inserted as an image in the style sheet doesn't get seen in the word doc, just comes up as a normal black list dot. They want the bullets in a diff colour to the text, any suggestions?

gentleone
07-05-2011, 11:09 AM
I'm amazed by ridiculous client stories/request such as this. You should post this question at the 'Clients from hell' website :)

http://clientsfromhell.net/

domedia
07-05-2011, 01:52 PM
That's funny 8)

gentleone
07-05-2011, 05:45 PM
That's funny 8)
Yeah... If I want to have a good laugh, I visit that site :)

@Smish
Try to talk your client out of this. Word is not for opening HTML docs, so he shouldn't expect that it will look the same or that you can edit it so that it suits his needs.

If he still insist to open your files in word... fire him :mrgreen: