Solved

How to show alt text when a mouse moves over a button

Posted on 2002-06-12
10
175 Views
Last Modified: 2010-04-09
Hi, all

I would like to create a button on a page. When the mouse is moved over the button, it should show an alt text "click me please". Please help me to do it. Thanks.
0
Comment
Question by:jl2001
10 Comments
 
LVL 10

Accepted Solution

by:
dij8 earned 50 total points
ID: 7074307
Do you mean a form button or an image?

An image needs an alt attribute:
<img src="apicture.gif" width="230" height="300" alt="Click me please" />

A form button doesn't seem to work with the alt attribute but does with title (this may be an IE only thing, try alt as well):
<input type="Button" value="enter" alt="Click me please" title="Click me please">
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 7074600
i think jl needs the tooltip instantly, http://dynamicdrive.com should get you a good one.
0
 
LVL 1

Expert Comment

by:ice911
ID: 7074734
i want you to know that there is a reason why there is not an alt attribute or really some kind of tooltip without cheating with script or something like flash.

the reason is because tooltip are used to give non-worded objects a little note to tell users what is that object.
it is kind of useless for a form button because the button should be descriptive enough. Unless this is an image button which is a different story, but if you must lexxwern is right you should try www.dynamicdrive.com it is a good place to start.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 10

Expert Comment

by:dij8
ID: 7074963
If title works as it did for me then dynamicdrive tooltips are not necessary.
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 7075040
it depends what jl wants.
0
 
LVL 17

Expert Comment

by:dorward
ID: 7075103
As nobody has mentioned it yet I'll go in to my standard rant.

The alt attribute is not there to provide tooltips, arguments have been made that NS4.x/IE/other browsers that display it as a tooltip are broken, NS6+ doesn't render it as a tooltip. It is there so that authors can provide text to be displayed *instead* of an image in the event that the image can not be displayed (e.g. images disabled, blind user with screen reader).

Almost all tags (including images) accept a title attribute which is there to provide additional information and is often rendered as a tooltip.
0
 

Expert Comment

by:endamcg
ID: 7092043
Dorward hit the nail on the head. "Alternate" text, self explanatory.

If you need something extra, much better than what dynamic drive can offer (IMHO) is overLib, you can get it free here::
http://www.bosrup.com/web/overlib/
0
 
LVL 10

Expert Comment

by:dij8
ID: 7092065
You can go all fancy with dynamic floating tool tips but it is simply done by using "title".

jl2001, some feedback here would be good.  Have we yet covered what you want?  If not, can you give us some more information.
0
 

Author Comment

by:jl2001
ID: 7112429
Hi, all

Sorry, I tried to connect to this site for many times but I couldn't.

I think "title" is the best way to do it. Thanks a lot.
0
 
LVL 10

Expert Comment

by:dij8
ID: 7114550
Glad to help.  Thanks for the A.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
If condition on Html with Asp 11 27
innerHTML 7 34
Media Queries  not Firing 6 17
Extracting content from meta tag PHP MYHTML DOM 3 20
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question