Current location: Hot Scripts Forums » General Web Coding » CSS » <ul> using different color other than black?


<ul> using different color other than black?

Reply
  #1 (permalink)  
Old 08-25-06, 10:14 AM
chrisrobertson chrisrobertson is offline
Newbie Coder
 
Join Date: Dec 2005
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Question <ul> using different color other than black?

Is it possible to have the <ul> bulleted list using something other than black? I would like the bullets to use the same color as the fonts, 0000aa.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-25-06, 10:29 AM
jfulton's Avatar
jfulton jfulton is offline
Community VIP
 
Join Date: Apr 2006
Location: Los Angeles, CA
Posts: 660
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not sure how you're using your styles, but this can be done with css. Check out http://www.echoecho.com/csslists.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-25-06, 10:36 AM
ste ste is offline
Newbie Coder
 
Join Date: May 2006
Location: Wales, UK
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Heya Chris,

try putting this in your css:

ul { list-style: square; color: #0000aa; }

I'm confident that will do the job for you, also check out jfultons link as that will go into splitting the colour of the bullet and text, which is quite handy to know.

Last edited by ste; 08-25-06 at 10:37 AM. Reason: didnt notice jfultons reply
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 08-26-06, 11:21 AM
chrisrobertson chrisrobertson is offline
Newbie Coder
 
Join Date: Dec 2005
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Question ok one more question

Is there anyway that only the "square" will be blue, and not the fonts?

Or do I need to add a font color to it?

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 08-26-06, 01:44 PM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Because the text is enclosed within the list tags, you would need to do something like the following -
Code:
<html>
<head>
<style type="text/css">
ul {list-style:square; color:blue}
.textcolor {color:gray}
</style>
</head>
<body>

<ul>
<li><span class="textcolor">Coffee</span></li>
<li><span class="textcolor">Tea</span></li>
<li><span class="textcolor">Coca Cola</span></li>
</ul>

</body>
</html>
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Black Jack... Poker... Other Casino Games stormshadow Script Requests 2 06-28-06 03:39 PM
GD 2+ Generates Black Thumbnail! digioz PHP 4 01-19-06 12:48 AM
black object appears over swf in IE NOT FF crmpicco HTML/XHTML/XML 0 11-03-05 10:44 AM
New Motorola V3 Razers W/extra's Unlocked In Black As Well $399.99 Paypal Accepted babygirlalltheway2005 General Advertisements 0 07-06-05 05:49 PM


All times are GMT -5. The time now is 09:18 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.