Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Location
    atlanta
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    why not just use straight CSS...

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

    ~Quack

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Location
    atlanta
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    the active property in css is temporary

    it does not stay 'active' if something else is clicked.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •