By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,766 Members | 1,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,766 IT Pros & Developers. It's quick & easy.

Bullet Colors

P: n/a
Is it possible in lists for the bullet to have a different color than
the text? If so how?
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Dante <pi******@reno.com> wrote:
Is it possible in lists for the bullet to have a different color than
the text? If so how?


HTML:
<ol>
<li><span>Test</span>
</ol>

CSS:
li
{
color: red;
}

li span
{
color: green;
}
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #2

P: n/a
pi******@reno.com (Dante) skrev :
Is it possible in lists for the bullet to have a different color than
the text? If so how?


<style type="text/css">
ul {color: red}
..black {color: black}
</style>
</head>
<body>
<ul>
<li><span class="black">one</span></li>
<li><span class="black">two</span></li>
</ul>
--
Knud
Jul 20 '05 #3

P: n/a
pi******@reno.com (Dante) wrote:
Is it possible in lists for the bullet to have a different color than
the text? If so how?


You could use the method with extra <span> in each <li>, as others have
suggested. But it's probably simpler to use images as bullets instead,
using list-style-image. This is more flexible since you can set the
shape too. The drawback is that the image is inevitably in fixed size
in pixels - making lists look a bit odd when the text size is
considerably larger or smaller than the size for which you have
designed the bullet image.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.