homepage Welcome to WebmasterWorld Guest from 54.196.168.78
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
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




msg:572398
 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




msg:572399
 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




msg:572400
 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




msg:572401
 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




msg:572402
 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




msg:572403
 10:21 pm on Jul 16, 2002 (gmt 0)

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

theebalinda




msg:572404
 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