468,257 Members | 1,410 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

Bullet Colors

Is it possible in lists for the bullet to have a different color than
the text? If so how?
Jul 20 '05 #1
3 3924
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
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
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.

Similar topics

14 posts views Thread by Gerald S. | last post: by
reply views Thread by Nikolaos Giannopoulos | last post: by
3 posts views Thread by Peter Schlenker | last post: by
1 post views Thread by David Bradbury | last post: by
8 posts views Thread by dp | last post: by
8 posts views Thread by Udo Marx | last post: by
13 posts views Thread by Matt | last post: by
6 posts views Thread by Nathan Sokalski | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.