PDA

View Full Version : onmouseover img change --> color link and viceversa


bnw
02-28-2010, 08:17 AM
Hello,

First the example code - very simple:

<a href="noon.php">TEST</a>
</p>
<a href="noon.php">
<img src="projecten_thumbs/noon_1.jpg" alt="noon" width="67" height="100" />
</a>

--> when I Hover the link the border color of the link AND the img must change
--> when I Hover the image the color of the image AND the link must change
--> when I Out the link the border color of the link AND the img must change
--> when I Out the image the color of the image AND the link must change

The purpose is simple, but how to implement it, I have no idea! I tried already a bunch of alternatives in DW (Change Propertie) but nothing is working until now!

Somebody who can help me?

thx
bnw

Corrosive
02-28-2010, 08:29 AM
You need to set the link styles using CSS;

a:link {border 1px solid #f00;}
a:visited {border 1px solid #f00;}
a:hover {border 1px solid #00E;}
a:active {border 1px solid #00E;}

That should handle the border colours (change hex values as appropriate). Then use the rollover image behaviours in DW to change the image (if that's what you want to do).