Page 1 of 1
How to display mouse over text on a link
Posted: Fri Aug 06, 2004 12:47 pm
by hawleyjr
If you have an image you can use alt="my text" to display text when the mouse goes over the image.
Can you do this to a Href link?
Works:
Code: Select all
<img src="/pix/button_drop.png" alt="Delete test">
Doesn't work:
Code: Select all
<a href="#" alt="my text">Click Here</a>
Posted: Fri Aug 06, 2004 1:02 pm
by Joe
I do not think that is possible. However, if it is possible then I am curious how that would work out!
Posted: Fri Aug 06, 2004 1:02 pm
by hawleyjr
They do it here:
http://forums.devshed.com/archive/t-169198
But I believe they are using DHTML. I'll check it out.
Posted: Fri Aug 06, 2004 1:06 pm
by feyd
Code: Select all
<a href="#" title="my text" alt="my text">Click Here</a>
Posted: Fri Aug 06, 2004 1:10 pm
by Joe
OK well I have just realised something. The link you posted has the links which contain "alt" however, it only works in IE and not mozilla. Interesting...
Posted: Fri Aug 06, 2004 1:13 pm
by Joe
OK well feyd's code worked on both browsers, hmm
Code: Select all
<a href="#" title="my text">Click Here</a>
It appears that "title" is doing the work

Posted: Fri Aug 06, 2004 1:21 pm
by feyd
older browsers will use the alt (if they support it outside img tags), and newer ones will use title..
Posted: Fri Aug 06, 2004 1:23 pm
by Joe
Ah I see, Thanks for the explination feyd!
Posted: Mon Aug 09, 2004 8:38 am
by Draco_03
they didn't do it like that else it would have worked in mozilla
they used
Code: Select all
.overlink {
cursor:pointer;
cursor:hand;
text-decoration: underline;
}
It's not a well written css, they tried putting hand and pointer to make it cross-browser, but it's not the right way.