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 October 24th, 2003, 02:54 PM
EAD's Avatar
EAD EAD is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: an hour away from L.A., California
Posts: 132 EAD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 11 m 40 sec
Reputation Power: 6
CSS for links isn't working

I can't seem to override my browser settings. I searched this forum for other posts relating to *hover* and actually just copied and pasted someone else's stylesheet into my doc just to see if it would work... doesn't.

Here is the CSS code in my <head> tag:

<style type="text/css">
<!--
.links {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14pt;
font-weight: bold;
a:link {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #5F7383;
text-decoration: none;
}
a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #5F7383;
text-decoration: none;
}
a:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #006A92;
text-decoration: underline;
}
a:active {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #006A92;
text-decoration: none;
}

}
-->
</style>

Then my <a href> tag looks like this:
<a href="G4.HTM" class="links">Sold Items</a>

Can someone tell me what I'm doing wrong?

Reply With Quote
  #2  
Old October 24th, 2003, 03:46 PM
nizack05's Avatar
nizack05 nizack05 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Wisconsin
Posts: 134 nizack05 User rank is Sergeant Major (2000 - 5000 Reputation Level)nizack05 User rank is Sergeant Major (2000 - 5000 Reputation Level)nizack05 User rank is Sergeant Major (2000 - 5000 Reputation Level)nizack05 User rank is Sergeant Major (2000 - 5000 Reputation Level)nizack05 User rank is Sergeant Major (2000 - 5000 Reputation Level)nizack05 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 8 h 30 m 33 sec
Reputation Power: 39
Send a message via AIM to nizack05
Did you put the <style> in the head? <head><style>....</style></head>

copy this code and see if it works, it works on my browser

<html>
<head>
<title></title>
<style type="text/css">
<!--
.links {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14pt;
font-weight: bold;
a:link {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #5F7383;
text-decoration: none;
}
a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #5F7383;
text-decoration: none;
}
a:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: red;
text-decoration: underline;
}
a:active {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #006A92;
text-decoration: none;
}

}
-->
</style>
</head>
<body>


Then my tag looks like this:
<a href="G4.HTM" class="links">Sold Items</a>
</body>
</html>

Reply With Quote
  #3  
Old October 24th, 2003, 03:56 PM
EAD's Avatar
EAD EAD is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: an hour away from L.A., California
Posts: 132 EAD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 11 m 40 sec
Reputation Power: 6
Yeah I had the script in the headtags. I tried your version all by itself on a page, and still the colors I set in IE are what shows. I looked at in netscape and no colors show at all except blue.

Reply With Quote
  #4  
Old October 24th, 2003, 03:59 PM
mrrichardfeder mrrichardfeder is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2001
Posts: 765 mrrichardfeder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 45 sec
Reputation Power: 7
Code:
<style type="text/css">

a:link.links, a:visited.links, a:hover.links, a:active.links {
	font: bold 14pt Verdana, Arial, Helvetica, sans-serif;
	text-decoration: none;
}
a:link.links {
	color: #5F7383;
}
a:visited.links {
	color: #5F7383;
}
a:hover.links {
	color: #006A92;
	text-decoration: underline;
}
a:active.links {
	color: #006A92;
} 

</style>


http://www.meyerweb.com/eric/css/link-specificity.html

Reply With Quote
  #5  
Old October 24th, 2003, 04:15 PM
EAD's Avatar
EAD EAD is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: an hour away from L.A., California
Posts: 132 EAD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 11 m 40 sec
Reputation Power: 6
This is closer because the link color is accurate, but no change on hover, etc. I changed the colors to the style to be more distinct:

<style type="text/css">

a:link.links, a:visited.links, a:hover.links, a:active.links {
font: bold 14pt Verdana, Arial, Helvetica, sans-serif;
text-decoration: none;
}
a:link.links {
color: #5F7383;
}
a:visited.links {
color: #FF6633;
}
a:hover.links {
color: #FFFF00;
text-decoration: underline;
}
a:active.links {
color: #006A92;
}

</style>

Here is the actual page:
http://www.rebecca-davis.com/testCSS.htm

If you see the changes there and I don't, then I guess maybe I should try reloading my IE.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS for links isn't working


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