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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling Link text color on hover 1

Status
Not open for further replies.

jockm

Technical User
Aug 13, 2002
41
0
0
GB
Good day

I have a left blue framed navbar (navbar.htm) on my site at with some 17 links on it. I have turned off underlining with <DIV ID=&quot;whyte&quot;>, the code for which is found in my external file, styles.css, linked to the navbar.htm file.

So far so good, all of the links lose their underlining as specified in #whyte, and 16 of the links give the a change in font color when the mouse hovers over them as specified in #whyte, when I test this with Explorer 5.1 for Macintosh off line.

Now here is the strange part: when I ftp these files up to the site, the colour of these links no longer changes when I hover the mouse over them. How can this work off line and not on line? What have I missed here? The source code for navbar.htm and styles.css is up on the web, and can be seen at and
In addition, to that disparity, one of the links, the last link, no. 17, (FACILITATORS ONLY) which is called out of a javascript password function called gateKeeper() located in scripts.js, doesnt change its colour when the mouse hovers over it off line or on line.

I am confused how this is possible. Any ideas very much appreciated.

jock
 
I don't know if it matters, but try this minor case change:

from: #whyte A:link
to: #whyte a:link

etc.

On your javascript, you may split that link into a seperate DIV:
<DIV ID = &quot;java&quot;><a href=&quot;javascript:gateKeeper()&quot; onMouseover=&quot;window.status='Remember your password is required!'; return true; &quot; onMouseOut=&quot;window.status=''; return true;&quot;><font color=&quot;#00FF00&quot;><B>(Facilitators
only)</B></font></a></DIV>

and then apply css to #java a:link {your: formatting; } etc..

why it doesn't work while it's online, I have no idea. If it makes you feel better, the text changes color for me on hover. WinXP/iexplorer 6.0

hope that helps, D

 
Hi Jock,
Try this...

1) drop the font tag with the color
<font color=&quot;#00FF00&quot;><b>(Facilitators only)</b></font>

2) try changing A:link to just A in your stylesheet

3) this is in your body tag:
style=font-size:smaller;&quot;border-left: 2 solid #FFFFFF>

maybe should be
style=&quot;font-size:smaller;border-left: 2 solid #FFFFFF&quot;>

Good Luck!


JimS.
aka
TenTonJim
Looking for work:) (in Florida???) I live in Washington State.
 
to TenTonJim

Thanks for catching the misplaced quotes mark in my <BODY> declaration. That didnt bring back hover to FACILITATORS ONLY, but it did solve another problem which had been puzzling me: why Netscape had not been making the navbar.htm type smaller! So thanks very much, and I give you a star.

And by the way, when I got up this morning, the hover text *was* changing colour as it should have been yesterday on line. Apparently it had to do with I.E.5 cache having been updated after so many hours. I thought I had purged the cache by holding down the option key when refreshing, but apparently not.

jock
 
TenTonJim

You wrote:

>>>>>>
1) drop the font tag with the color
<font color=&quot;#00FF00&quot;><b>(Facilitators only)</b></font>
>>>>>>



Tried that. All that happens is that &quot;Facilitators only&quot; is now white. But hover still doesnt work. Anyway, I want it green!
Maybe with an ID?

>>>>>>
2) try changing A:link to just A in your stylesheet
>>>>>>

Not clear exactly what you are suggesting. At present the code is reading (in styles.css):

>>>>>>
#whyte A:link, #whyte A:visited, #whyte A:active {color:#FFFFFF;text-decoration:none}
#whyte A:hover {color:#FFFF33}
>>>>>>

What are you suggesting I should change there?

thanks

jock


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top