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?
views:
221answers:
4Your link is for html tag (for setuping PAGE title), this have no common with a title attribute. Why you get +1 for this?
Svisstack
2010-06-07 18:23:43
Oops wrong link; corrected.
JYelton
2010-06-07 18:25:10
+1
A:
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):
Title attributes can be applied to most HTML elements.
adrianbanks
2010-06-07 18:19:05
@adrian but it displays all info in one line only what if - <img src="myimage.jpg" alt="a cat" title="My cat <br> sat on a table" />
nectar
2010-06-07 18:49:47
@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
2010-06-07 18:57:19
A:
The title
attribute works on most HTML tags and is widely supported by modern browsers.
Asaph
2010-06-07 18:19:26
but it displays all info in one line only what if - <img src="myimage.jpg" alt="a cat" title="My cat <br> sat on a table" />
nectar
2010-06-07 18:51:37
ALT's main importance is for accessibility to people with vision impairments.
Superstringcheese
2010-06-07 18:29:20
@Super, it is importnat actually, have a look at : http://www.seoworkers.com/seo-articles-tutorials/alt-attribute.html
Sarfraz
2010-06-07 18:30:16
@nectar: yes it works there too but you should be worried about browsers being used now by the masses.
Sarfraz
2010-06-07 18:31:49
but it displays all info in one line only what if - <img src="myimage.jpg" alt="a cat" title="My cat <br> sat on a table" />
nectar
2010-06-07 18:52:44
@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
2010-06-07 19:08:21