Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

<ul> Specify colour of text and bullet independently?

0 views
Skip to first unread message

Stephen Oakes

unread,
May 29, 2002, 6:59:17 PM5/29/02
to
Is there a way, using CSS, to specify the colour of the bullet without
changing the colour of the text?

For example, I use this:
ul { color:0000FF; list-style : square }

This makes a blue square bullet, but the text also changes to blue.

Can I change the bullet colour without changing the text colour?

--
Stephen Oakes

Jake Marx

unread,
May 29, 2002, 7:46:47 PM5/29/02
to
Hi Stephen,

"Stephen Oakes" <soa...@hotmail.com> wrote in message
news:8be49854.02052...@posting.google.com...


> Is there a way, using CSS, to specify the colour of the bullet without
> changing the colour of the text?

You can use a class and apply that class to a <span> inside each <li>
element. I've pasted an example below.

Alternatively, you could use an image for the bullet. However, I don't
believe that works in NN 4.x.

Regards,

Jake Marx
www.longhead.com

<html>
<head>
<style type="text/css">
<!--
ul
{
color: #0000FF;
list-style: square
}
.txtLI
{
color: #000000
}
// -->
</style>
</head>
<body>
<ul>
<li><span class="txtLI">This is a test.</span></li>
<li><span class="txtLI">This is test 2.</span></li>
</ul>
</body>
</html>


0 new messages