Forum Moderators: not2easy
The CSS code:
a { text-decoration: underline; }
a:hover {
color: #ff0000;
background: #ffff00;
text-decoration: underline;
}
------------------------------
The HTML code:
<script type="text/JavaScript">
var name = "barbara";
var domain = "domainname.com";
document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
</script>
<img src="animail.gif" align="middle"
border="0" alt="Email Barbara at Our Store" width="101" height="105"><br>
<script type="text/JavaScript">
document.write('</a>');
</script>
And in another case, the HTML code is:
<td class="text" valign="bottom">
<a href="http://www.domainname.com" target="_self"><img src="forum_images/image.gif" border="0"></a>
</td>
-----------------
Thoughts?
Shadows Papa
You may want to try and play with the settings for linked images to clean that up. e.g.
a:hover img{
background:none;
text-decoration:none
}
That may do the trick.
thought that a:hover would only work for the border of the image, not the image itself.
You have to specify this in the pseudo classes for it to occur, and from what I can remember, IE doesn't apply it directly to images, you have to wrap the image in a div and apply the border changing (on hover) to the linked div.
div.hovimg a:link, div.hovimg a:visited{border:1px solid red;}
div.hovimg a:link, div.hovimg a:visited{border:1px solid gray;}
That would be the idea, with the code like this:
<div class="hovimg"><a...><img.../></a></div>
I believe that there is also a bit of hacking required to satisfy IE5, and that you need to set a width on the 'a' at some point for it to work properly.