smeshy123
05-25-2005, 05:04 AM
Ok, here is what I am trying to acheive. I have two different classes of links in a css file. When you roll over the link I would like it to change from one class (in effect altering the appearance of the link) and back to the other. I don't generally use JavaScript, and i've played around with it for a little while with no luck. What is the easiest way to do this? And is there another way of doing this besides what I thought of?
Thanks!
Smesh
qwertyuiop
05-25-2005, 05:11 AM
You don't need javascript for this. Just use hover.
a.link {color: black;}
a.link:hover {color: red;}
mrruben5
05-25-2005, 03:18 PM
Note that you can't use the peudo hover element on other elements.
If you want to do that, use
onmouseover="this.className=blablah" onmouseout="this.className=blablah"
:)
glenngv
05-26-2005, 05:32 AM
Note that you can't use the peudo hover element on other elements.
If you want to do that, use
onmouseover="this.className=blablah" onmouseout="this.className=blablah"
:)
That's only true with IE only. But there is fix (http://www.vladdy.net/demos/iepseudoclassesfix.html) for that without putting onmouseover and onmouseout handlers for all the elements.