Multi Colored Lists

This is a discussion on "Multi Colored Lists" within the Web Page Design section. This forum, and the thread "Multi Colored Lists are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 10th, 2006, 19:30
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Multi Colored Lists

This was asked and I thought it was interesting so here goes making bullets a different color from the list content.

Code: Select all
    
#foo li span {color:#FF6600;}

#foo li {color:#000;}
Code: Select all
<ol id="foo">
<li><span>Foo!</span></li>
</ol>
Easy and simple but effective.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)

Last edited by moojoo; Oct 12th, 2006 at 16:09.
Reply With Quote

  #2 (permalink)  
Old Oct 10th, 2006, 20:16
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Multi Colored Lists

Nifty trick........ might be a good idea to provide some explanation to run along with it though

jusy imo


Reply With Quote
  #3 (permalink)  
Old Oct 10th, 2006, 20:21
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Multi Colored Lists

making bullets and list content different colors. Too lazy to upload a screenshot atm.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #4 (permalink)  
Old Oct 10th, 2006, 22:31
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Multi Colored Lists

I think this is likely to confuse newcomers to css as you only have one <li> element and it has a <span> element inside it, so the spanned text is always going to be the #foo li span colour.

I think I know what you wanted to achieve but this isn't it. IMO.
Reply With Quote
  #5 (permalink)  
Old Oct 10th, 2006, 23:48
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Multi Colored Lists

Hell man, if you have a better way to make bullets and li content different colors without using images let me know. Maybe with a selector?
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)

Last edited by moojoo; Oct 11th, 2006 at 00:21.
Reply With Quote
  #6 (permalink)  
Old Oct 11th, 2006, 21:42
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Multi Colored Lists

I originally interprited your post as meaning each li in a group of li's to be a different colour.

I now realise this is not what you meant. You want the bullett to be a different colour to the text but the same throughout the group of li's.

I'm with you now.
Reply With Quote
  #7 (permalink)  
Old Oct 12th, 2006, 13:04
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Multi Colored Lists

Yeah Herkalees asked me about this the other day and this was the first solution I came up with in a pinch without using images. I have been playing with some selectors etc but couldn't find another way to do it... But for now this seems acceptable without too much extra markup.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #8 (permalink)  
Old Oct 12th, 2006, 16:07
Reputable Member
Join Date: Jul 2005
Posts: 400
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Multi Colored Lists

I was under the same impression geoff.

The initial post title had me thinking that each list item would be a different color. The first sentence of his post explained it better, but still not real clear. After seeing the code it was definately clear.

Multi colored list items would just require a separate ID tag for each span and a coordinating CSS color declaration.
Reply With Quote
  #9 (permalink)  
Old Oct 15th, 2006, 01:35
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Multi Colored Lists

Yeah, the title is misleading. I've never thought of using a bullet that different from the text color. Interesting idea.
Reply With Quote
Reply

Tags
css, lists

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-league and Multi-tiered team schedule overkil6 Website Planning 3 Jun 17th, 2008 22:04
Single Colored Themes josephman1988 Webforumz Cafe 4 Sep 29th, 2007 21:48
colored scroll bar bruno89 Web Page Design 4 Mar 2nd, 2006 19:56
Need help with my lists csa Web Page Design 1 Dec 1st, 2005 15:02


All times are GMT. The time now is 22:06.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43