Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A.XYZ:hover doesn't work for visited links

Status
Not open for further replies.

okiiyama

IS-IT--Management
Joined
Jan 3, 2003
Messages
269
Location
US
I've got a style sheet being used by a bunch of pages, and it has come to my attention that a visited link during hover will not change color (From blue to black).
this is my code in the style sheet:
Code:
A.TenPx-NormalBlueLinks:link {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #27408B; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
}
A.TenPx-NormalBlueLinks:hover {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
}
A.TenPx-NormalBlueLinks:active {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #999999; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
}
A.TenPx-NormalBlueLinks:visited {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #27408B; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
}

I would use javascript to change a link text color during hover, but I would rather not since I would need to do so on all the pages. Is there something I could add to this class, so I don't need visited links during hover would turn black?

Thanks.
 
Thanks... link, visited, hover, active did it.
 
HTML tags should be lowercase, however, as should all your style properties.
Not true. HTML tags can be upper, lower or mixed case - it doesn't care. XHTML tags have to be in lower case. I think it's a good idea to get into the habit of writing lower case tags, but it's not necessary.

Classes and IDs are case sensitive - so "Class", "class" and "CLASS" are different, but equally valid, values. You'll save yourself hours of tracking down hard-to-spot CSS bugs if you pick a single case convention and stick to it, personally I always put my classes and ids in lower case.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
we must often watch what we say when Mr. Hunt is around.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top