Hello Everyone,
I have a css style sheet with all my links to be the color black by default.
I also have a function that changes the color of the link onmouseover which is the following:
[CODE]function changeColorHeader(els) {
els.style.color = “#1569c7”;
//add another function to change back to its original color
if(document.addEventListener) {
els.addEventListener(“mouseout”, function () { els.style.color = “black”; }, false);
} else if(document.attachEvent) {
els.attachEvent(“onmouseout”, function() { els.style.color=”black”;});
}
//this area is missing
return; // this area is missing
}// this is the missing (}) code that triggers the error
I’d like to make a CERTAIN link a different color from the default so it can stand out.
How can I do that?
I have tried the following:
Code:
<span style=”color:#ff0000;”> test </span>
inside the
Code:
<a href> </a>
And what that does is that it does change the link color to RED which is what I have there, but the onmouseover to change the link doesn’t work, it says RED the whole time.
Is there something in my original code that I can tweak to basically just have that link show up with a different color and then have the option of a different color onmouseover?
I also tried writing a class in CSS:
Code:
A.red:link {color: #ff0000; text-decoration: none;}
And that didn’t work either…
Any info would be greatly appreciated!!
Thanks!
WD