Click to See Complete Forum and Search --> : Changing text-decoration of link from a mouseover of an image


eclipse88
05-27-2004, 11:59 AM
Hello,

Can you someone please give me an example of how you can change the text-decoration of an href when you mouseover a separate image?

Ex: When you mouseover img "a", the text in link "b" gets a text-decoration of "underline"

thx

DaveSW
05-27-2004, 03:07 PM
Could you nest it?

<a href="#"><img blah blah blah><span>link text</span></a>
Then absolutely position one of them if they need to be further apart.

Please note I haven't tested it so I've no idea if it works

TheBearMay
05-27-2004, 03:18 PM
Try something like this:


<style>
a.test {
text-decoration:underline;
}
</style>
...

<img src="YourImg.jpg" onmouseover="document.getElementById('tLink').className='test'" />
<a href=# id="tLink">Test</a>