Mouseover question

liunx

Guest
I remember reading somewhere, but now I can't remember - how to make an image in one part of the page change when you mouseover linked text in another part of the page?<br />
If the text is next to the image, can I just be lazy and leave the tags open to include both text and image in the link? Or will this mess up my code?<br />
Any help would be appreciated :)<!--content--><img src='http://www.webdeveloper.com/forum/archive/index.php/imageB.gif' id='imgChange' width=75 height=75><br />
<br />
<a href='http://www.webdeveloper.com/forum/archive/index.php/#' onmouseover="document.getElementById('imgChange').src = 'http://www.webdeveloper.com/forum/archive/index.php/imageA.gif';" onmouseout="document.getElementById('imgChange').src = 'http://www.webdeveloper.com/forum/archive/index.php/imageB.gif';'">Link</a><br />
<br />
<br />
you can placed the image to change anywhere on the page.<!--content-->Hey thanks for that, it works great now :)<br />
A kind of follow-on question.... I'm using the following code in my head to get hover link underlines:<br />
<br />
<style type="text/css"><br />
<!-- A:link {text-decoration: none}<br />
A:visited {text-decoration: none}<br />
A:active {text-decoration: none}<br />
A:hover {text-decoration: underline}<br />
--> </style><br />
<br />
Every link on the page has a corresponding picture which now changes when you hover over its text (thanks!), but how can I get the underline to appear on the link when you hover over its image?<br />
<br />
Thanks again :)<!--content-->
 
Back
Top