Web Analytics Made Easy -
StatCounter changing a links color in NS6 - CodingForum

Announcement

Collapse
No announcement yet.

changing a links color in NS6

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    why not just use straight CSS...

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

    ~Quack

    Comment


    • #3
      the active property in css is temporary

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

      Comment

      Working...
      X