Onmouseover image border changing

liunx

Guest
Hi, <br />
I was wonddering if it was possible to change the background colour of a link image using the onmouseover event, and if so, how?<!--content-->If it truly is a link, then you could easily use CSS. <br />
a:hover img {background-color: whatever}<br />
If you want to use JS:<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"whatever" onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor=''"><img src=http://www.webdeveloper.com/forum/archive/index.php/"lilguy2.gif"></a><br />
It actually changes the background color of the anchor, but it is easier to do it this way, thanks to the "this" operator.<!--content-->OK thanks.<br />
I will probably go with the JavaScript option, as i'm still a bit of a noob when it comes to CSS :P<!--content-->but they css is so easy<!--content-->
 
Back
Top