PDA

View Full Version : Mouse Over?



michael180
Mar 25th, 2007, 07:30 PM
I want to be able to give a brief description of a link as the user moves the mouse over the link. Any suggestions?

Thanks

jlhaslip
Mar 25th, 2007, 07:32 PM
Add title="Brief Description Here" to the link in addition to an alt="Brief Description Here" for the benefit of less Modern Browsers.

Or use the following technique:
http://www.jlhaslip.trap17.com/samples/tooltips/ if you want something fancier.

michael180
Mar 25th, 2007, 07:42 PM
Perfect!

Thank you very much.

Michael

twodayslate
Mar 25th, 2007, 07:54 PM
CSS would be better than javascript. title="#" would be the best though.

CSS

.hover {default text style}
.show { display: none;}
a:hover .show {display: block;}

HTML


<a class=”hover”>whatever</a>
<span class=”show”>This will popup when you hover over the td.</span>

michael180
Mar 26th, 2007, 06:14 PM
REF: http://moderntimes.com

I don't think any of this will work because the mouse-over information must be contained in a "navlist" and if I add any of the above that list gets out of whack.

Thanks

_Aerospace_Eng_
Mar 26th, 2007, 06:38 PM
You do realize that you actually needed to style the above for it to work properly? It was just an example. Making it position:absolute; won't put things "out of whack".

Check these CSS tooltips (http://psacake.com/web/jl.asp) out.

michael180
Mar 26th, 2007, 07:18 PM
Yes I do realize that, but if I add information between the <li> and </li> it expands the length of the line thus throwing it "out of whack". I want to add mouse over information to the particular link item.

That's what I meant.

VIPStephan
Mar 26th, 2007, 07:24 PM
Add title="Brief Description Here" to the link in addition to an alt="Brief Description Here" for the benefit of less Modern Browsers.
Actually there is no alt attribute on any element other than images. So leaving that out would not only do no harm but it would also make the code valid.

twodayslate
Mar 26th, 2007, 11:51 PM
If you are having a problem with the line changing height have the line be set in pixels.

The hover still works with lists but you may need a hack for IE 6.

jlhaslip
Mar 27th, 2007, 02:05 AM
Ah! a left-over bad habit from the days when IE didn't use the title tag.
:)

Thanks for the reminder.