CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 31st, 2004, 01:18 AM
Chrisby's Avatar
Chrisby Chrisby is offline
So many bugs, so little time!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Australia
Posts: 36 Chrisby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Question problem with CSS

I use a stylesheet to define the style of 'a' i.e hyperlinks.
it looks something like this:
a {
color:white;
font-family:verdana, arial, helvetica, sans-serif;
text-decoration:none;
}
a:link {color:white;}
a:visited {color:white;}
a:hover {background-color:white;
color:#808080;
}

This works great, but how do I explicitly change the style of other hyperlinks on the same page. They would typically be in a div. I have tried all kinds of things anc just can't get it to work.
Thanks a lot...
__________________
Please turn over for witty signature.
Chrisby

Reply With Quote
  #2  
Old March 31st, 2004, 01:21 AM
binky's Avatar
binky binky is offline
Gerbil
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: In a Rotastak
Posts: 1,763 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 22 h 12 m 52 sec
Reputation Power: 19
Give your hyperlinks a class:

<style type='text/css'>
a.blueLink {color:blue;}
a.blackLink {color:black;}
</style>

Then:

<a href='#' class='blueLink'>blue link</a><br>
<a href='#' class='blackLink'>black link</a>
__________________
- Sorted!

www.ppfuk.com - Free Photo Sharing

Reply With Quote
  #3  
Old March 31st, 2004, 01:23 AM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 20th Plane (14500 - 14999 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,565 jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 22 h 35 m 18 sec
Reputation Power: 835
Code:
<div id="foo"><a href="link.html">Link</a></div>
Code:
#foo a:link
or
Code:
<a class="foo" href="link.html">Link</a>
Code:
a.foo:link
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
  #4  
Old March 31st, 2004, 01:57 AM
Chrisby's Avatar
Chrisby Chrisby is offline
So many bugs, so little time!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Australia
Posts: 36 Chrisby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Thanks binky, that worked!
Sorted!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > problem with CSS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT