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

Color square Bullet points

0 views
Skip to first unread message

Dwight

unread,
Jan 25, 2006, 11:12:05 AM1/25/06
to
Hi

I have the following simple code to show a square bullet

<ul>
<li type="square">Apples</li>
<li type="square">Pears</li>
<li type="square">Peach</li>
</ul>

How can I change the color of the bullet points from black to red?

TIA
Dwight


Bob Barrows [MVP]

unread,
Jan 25, 2006, 11:46:20 AM1/25/06
to
You need to provide your own image using the css list-style-image property:
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/liststyleimage.asp
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Dwight

unread,
Jan 30, 2006, 6:27:27 AM1/30/06
to
Hi Bob,

Thanks for this.

It appears that this command applies to the whole web page, how can I apply
it to just some of the bullet points on the page.

For example

<li type="square">Apples</li> <-- Default square
<li type="square">Pears</li> <-- Show the colored gif
<li type="square">Peach</li> <-- Default square

TIA
Dwight

Bob Barrows [MVP]

unread,
Jan 30, 2006, 6:49:44 AM1/30/06
to
Dwight wrote:
> Hi Bob,
>
> Thanks for this.
>
> It appears that this command applies to the whole web page,

Huh?

> how can I
> apply
> it to just some of the bullet points on the page.
>
> For example
>
> <li type="square">Apples</li> <-- Default square
> <li type="square">Pears</li> <-- Show the colored gif
> <li type="square">Peach</li> <-- Default square
>
> TIA
> Dwight
>
>

Several options:
1. Define a class:

<style>
.coloredgif { list-style-image:url(dot.gif) }
</style>


<li type="square">Apples</li> <-- Default square

<li class-"coloredgif">Pears</li> <-- Show the colored gif


<li type="square">Peach</li> <-- Default square

2. Use inline style

<li type="square">Apples</li> <-- Default square

<li style="list-style-image:url(dot.gif)">Pears</li> <-- Show the

colored gif
<li type="square">Peach</li> <-- Default square

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Dwight

unread,
Jan 30, 2006, 12:00:37 PM1/30/06
to
Thanks you're a star, that worked a treat.
0 new messages