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 April 29th, 2002, 05:07 PM
marron79's Avatar
marron79 marron79 is offline
Rut row Raggy!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: Tornado Alley
Posts: 558 marron79 User rank is Private First Class (20 - 50 Reputation Level)marron79 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 9 h 41 sec
Reputation Power: 8
Question Need help w/using CSS for links

I'm trying to setup an external style sheet that will display links as one color w/no underline in all stages except hover--in which it will be the same color, but underlined. My CSS code is listed below, as well as my HTML code:

CSS--->
A.white:link {
COLOR: #FFFFFF; TEXT-DECORATION: none
}
A.white:active {
COLOR: #FFFFFF; TEXT-DECORATION: none
}
A.white:hover {
COLOR: #FFFFFF; TEXT-DECORATION: underline
}
A.white:visited {
COLOR: #FFFFFF; TEXT-DECORATION: none
}

HTML--->
<a class=white href="contact.php">Contact Us</a>

However--when I visit a link, the link assums the properties of visited when I hover of it. I think I'm doing something wrong. Any ideas?
__________________
Matt

Reply With Quote
  #2  
Old April 29th, 2002, 05:15 PM
bulliver bulliver is offline
slacker
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Penticton BC Canada
Posts: 35 bulliver User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to bulliver
Hello,

the same thing happened to me. . .The links would not hover after being visited once. I assumed it was a bug in my browser (ie5.5)

might have to work around it with JavaScript. . .
__________________
Support the mob or mysteriously disappear!!

Reply With Quote
  #3  
Old April 30th, 2002, 01:45 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Put your declaration for a:hover after your declaration for a:visited. Always put the :hover last, because that's the one you want to take precedence.

Reply With Quote
  #4  
Old May 2nd, 2002, 09:29 AM
csscsscsscss csscsscsscss is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Windsor, England
Posts: 1 csscsscsscss User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool

When using css it is generally the styandard to use pseudo classes for links in the following order:

link--visited--hover--active (or "love...ha!")
CSS--->
A.white:link {
COLOR: #FFFFFF; TEXT-DECORATION: none
}
A.white:visited {
COLOR: #FFFFFF; TEXT-DECORATION: none
}
A.white:hover {
COLOR: #FFFFFF; TEXT-DECORATION: underline
}
A.white:active {
COLOR: #FFFFFF; TEXT-DECORATION: none
}

This should solve the problem.

Peter

Reply With Quote
  #5  
Old May 2nd, 2002, 10:13 PM
marron79's Avatar
marron79 marron79 is offline
Rut row Raggy!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: Tornado Alley
Posts: 558 marron79 User rank is Private First Class (20 - 50 Reputation Level)marron79 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 9 h 41 sec
Reputation Power: 8
bricker42's idea of placing the hover after visited worked. Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Need help w/using CSS for links


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 2 hosted by Hostway