Welcome to WebmasterWorld Guest from 23.22.206.103

Forum Moderators: incrediBILL

Message Too Old, No Replies

unordered list with bullets a different color from text

     
8:24 pm on Jul 16, 2002 (gmt 0)

New User

10+ Year Member

joined:Apr 11, 2002
posts:19
votes: 0


Hi everyone;
Just wondering if anyone knew how to make the
bullet in an unordered list a different color than
the text.

thanks,
TheebaLinda

8:46 pm on July 16, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 10, 2001
posts:1551
votes: 10


<ul style="list-style-image:url(green.gif);"> 
<li>first item</li>
<li>second item</li>
<li>etc...</li>
</ul>

Obvously, you can change more than just the color that way... ;)

9:37 pm on July 16, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Just one caution, those image bullets won't scale with different font sizes like the default font bullets do (which is obvious once you think about it).

I think you can also define the ul style and then put a span around the text in each <li></li> to change the font color. This would give you scalable bullets.

9:46 pm on July 16, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


It works:

<ul style="color:blue">
<li><span style="color:red">One</span></li>
<li><span style="color:green">Two</span></li>
<li><span style="color:violet">Three</span></li>
</ul>

10:02 pm on July 16, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 10, 2001
posts:1551
votes: 10


Heh, now you inspired me to more experiments:

<ul>
<li style="color: green;"><span style="color: pink;">eins</span></li>
<li style="color: blue;"><span style="color: orange;">zwei</span></li>
<li style="color: red;"><span style="color: black;">drei</span></li>
</ul>

It may not be pretty, but it sure is colorful... ;)

10:21 pm on July 16, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


You never can tell when those little flashes of brilliance will come in handy.
4:17 pm on July 17, 2002 (gmt 0)

New User

10+ Year Member

joined:Apr 11, 2002
posts:19
votes: 0


Thanks so much;

exactly what I needed : )

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members