I have three links on my site project (not live yet) and when you hover over the links I have the text and border change color. Example: when you hover over the home link the border color changes to blue and the text also changes to blue.
I would like my logo to also change to the same color as the link someone is hovering over.
Could anyone help out with this? I would be very greatful.
02-07-2012, 07:44 PM
This is completely possible, however if your Logo is an image you're going to have to make a second copy of your Logo and make it blue as well. Then when you hover over it, it will swap out your current Logo for the blue version.
The following will take the first image called "logo" and replace it with an image named "logoblue" when you hover over it.
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover ="MM_swapImage('logo','','images/logoblue.jpg',1)">
<img src="images/logo.jpg" alt="work" name="logo" width="109" height="31" border="0" id="logo">
Thanks for the reply and the code, however I tried that before and it never worked properly. The image shows up before any hovering on a link. So basically I have 2 logos in the header.
I did manage to get it to work (sortof) and when I hovered over my link the logo image appeared, but I am still having trouble getting it in the correct position. I think my solution will work with a little more time and code effort.
I will put this as resolved and keep plugging away.
02-08-2012, 03:32 PM
absolutely not a problem!
If you find that it's still giving you troubles please feel free to post the code where your logo is at and we'll be more than happy to help out :D