Click to See Complete Forum and Search --> : Mouseover question
Shelagh Of Doom
07-11-2003, 02:30 AM
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?
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?
Any help would be appreciated :)
<img src='imageB.gif' id='imgChange' width=75 height=75>
<a href='#' onmouseover="document.getElementById('imgChange').src = 'imageA.gif';" onmouseout="document.getElementById('imgChange').src = 'imageB.gif';'">Link</a>
you can placed the image to change anywhere on the page.
Shelagh Of Doom
07-17-2003, 06:00 PM
Hey thanks for that, it works great now :)
A kind of follow-on question.... I'm using the following code in my head to get hover link underlines:
<style type="text/css">
<!-- A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration: underline}
--> </style>
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?
Thanks again :)