I am displaying 5 userImage
on one screen.I want to display userID
and email
on mouseover
on those userImage.I used alt
property of image control but that not working in mozila,chrome and some versions of IE.
So what are the other better ways to display info on mouseover?
Asked
Active
Viewed 1.2e+01k times
57
3 Answers
73
Use the title
attribute while alt
is important for SEO stuff.
-
1Your title link is not useable in this problem. – Svisstack Jun 07 '10 at 18:26
-
ALT's main importance is for accessibility to people with vision impairments. – Jun 07 '10 at 18:29
-
1@Super, it is importnat actually, have a look at : http://www.seoworkers.com/seo-articles-tutorials/alt-attribute.html – Sarfraz Jun 07 '10 at 18:30
-
1@sarfraz does `title` work in mozila nd chrome nd all versions? – nectar Jun 07 '10 at 18:30
-
@nectar: yes it works there too but you should be worried about browsers being used now by the masses. – Sarfraz Jun 07 '10 at 18:31
-
but it displays all info in one line only what if -
– nectar Jun 07 '10 at 18:52
-
@nectar: That's how it will display, you can not control that or split it otherwise you will have to use some other fancy tooltip that you can search on google. – Sarfraz Jun 07 '10 at 19:08
34
The simplest way to get tooltips in most browsers is to set some text in the title attribute.
eg.
<img src="myimage.jpg" alt="a cat" title="My cat sat on a table" />
produces (hover your mouse over the image):
a cat http://www.imagechicken.com/uploads/1275939952008633500.jpg
Title attributes can be applied to most HTML elements.

whenov
- 733
- 1
- 9
- 19

adrianbanks
- 81,306
- 22
- 176
- 206
-
-
@nectar: you cannot insert line breaks using this method - you have to leave it to the browser to insert line breaks where it thinks most appropriate. – adrianbanks Jun 07 '10 at 18:57