homepage Welcome to WebmasterWorld Guest from 54.145.183.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
unordered list with bullets a different color from text
theebalinda

10+ Year Member



 
Msg#: 2801 posted 8:24 pm on Jul 16, 2002 (gmt 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

 

bird

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2801 posted 8:46 pm on Jul 16, 2002 (gmt 0)

<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... ;)

tedster

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



 
Msg#: 2801 posted 9:37 pm on Jul 16, 2002 (gmt 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.

tedster

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



 
Msg#: 2801 posted 9:46 pm on Jul 16, 2002 (gmt 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>

bird

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2801 posted 10:02 pm on Jul 16, 2002 (gmt 0)

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... ;)

tedster

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



 
Msg#: 2801 posted 10:21 pm on Jul 16, 2002 (gmt 0)

You never can tell when those little flashes of brilliance will come in handy.

theebalinda

10+ Year Member



 
Msg#: 2801 posted 4:17 pm on Jul 17, 2002 (gmt 0)

Thanks so much;

exactly what I needed : )

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved