Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-03-2002, 04:27 PM   PM User | #1
Yellow Jacket
New to the CF scene

 
Join Date: Jul 2002
Location: atlanta
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Yellow Jacket is an unknown quantity at this point
Question changing a links color in NS6

I am trying to get text links in a navigator frame to change to a different color than the colors defined in css until another link in the navigator is clicked. I got this to work in IE 6, but not NS 6. Here is my code:

link HTML
<A HREF="linkurl" TARGET="ContentFrame" onClick="setLinksColor();this.style.color='white'" >LinkTitle</A>

CSS:
A:LINK {
text-decoration : none;
font-style : normal;
color : black;
font : 8pt Arial;
}

A:VISITED {
text-decoration : none;
color : black;
font : 8pt arial;
}

A:HOVER {
text-decoration : none;
color : gray;
font : 8pt Arial;
}

A:ACTIVE {
text-decoration : none;
color : white;
font :normal 8pt Arial;
}

Javascript:
function setLinksColor() {
for (var i = 0; i < document.links.length; i++)
{
document.links[i].style.color="";

}
}

Can someone help? I hope this makes sense.

Thanks

Yellow Jacket
Yellow Jacket is offline   Reply With Quote
Old 07-03-2002, 04:52 PM   PM User | #2
QuackHead
Regular Coder

 
Join Date: Jun 2002
Posts: 344
Thanks: 0
Thanked 0 Times in 0 Posts
QuackHead is an unknown quantity at this point
why not just use straight CSS...

It should be working with just CSS, you shouldn't need a JS function

~Quack
QuackHead is offline   Reply With Quote
Old 07-03-2002, 04:56 PM   PM User | #3
Yellow Jacket
New to the CF scene

 
Join Date: Jul 2002
Location: atlanta
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Yellow Jacket is an unknown quantity at this point
the active property in css is temporary

it does not stay 'active' if something else is clicked.
Yellow Jacket is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:59 AM.


Advertisement
Log in to turn off these ads.