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

link colours not working

Status
Not open for further replies.

JillC

Technical User
Jan 10, 2001
241
AU
I set up a stylesheet with this -
a:link {color: #FFcc99;}
a.link2:link {color: #A0274B;}

This works fine on pages where the link goes to another page or a mailto. But it does not show up with the right colours with a bookmark link in IE6. Looks fine in Netscape and looks fine when I test locally in IE6 but when I upload it, the link shows black.

The problem page -
The page where it works -
What am I doing wrong?
[sadeyes]
 
You need to set the style for visited links...
Code:
 a:link    {color: #FFcc99;}
 a:visited {color: #FFcc99;}
 a:hover   {color: #FFcc99;}
-gerrygerry

"I'm doin' a one-nighter for bitin' Ed the mail man... the guy was tryin' to cast a spell on me... like a wizard or something."
"Are you sure about that?"
"I dunno... maybe he was just wavin'..."
 
I guess it's my fault for trying to be too brief gerrygerry!

My stylesheet contains (in part) this -
a:link {color: #FFcc99; font-weight: bold}
a:visited {color: #ffffcc;font-weight: bold}
a:hover {color: #FFFFFF;text-decoration: none; font-weight: bold}
a:active {color: #FFFFFF;text-decoration: none}
a.link2:link {color: #A0274B;font-weight: bold; text-decoration: underline;}
a.link2:visited { color: #000000; font-weight: bold}
a.link2:hover { color: Black; text-decoration: none;
font-weight: bold}
a.link2:active {color: Black; text-decoration: none}
So, what's wrong with it?

Jill.
 
Well, it looks like all the links on the first page are just pointing to some derivation of order.htm... so as soon as order.htm loads, it designates them all as visited. -gerrygerry

"I'm doin' a one-nighter for bitin' Ed the mail man... the guy was tryin' to cast a spell on me... like a wizard or something."
"Are you sure about that?"
"I dunno... maybe he was just wavin'..."
 
They are pointing to anchors within the same page. That does not explain to me why the page should load all links as visited. It's quite beyond me.

I've changed the links around so that the navbar links are a class and the body links are standard, and changed the visited colour the same as the link colour. So it looks better but it is not what I wanted to achieve.

Never mind, I've given up now. Have other things to do.
 
Although the links only point to anchors, you are qualified as 'visiting' those links as soon as you view the part of the page that contains the anchors. Sorry! -gerrygerry

"I'm doin' a one-nighter for bitin' Ed the mail man... the guy was tryin' to cast a spell on me... like a wizard or something."
"Are you sure about that?"
"I dunno... maybe he was just wavin'..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top