Page 1 of 1

mozilla firefox - image alternative text

Posted: Thu Jun 02, 2005 5:01 pm
by ddragas
How to make up mozilla firefox browser to show up alternative text while mouse over image like IE does?

Posted: Thu Jun 02, 2005 5:07 pm
by onion2k
By putting the text in the title attribute as the HTML spec tells you to. Alt text is only for when the browser is unable to display the image, title text is for the tooltip.

Code: Select all

<img src=&quote;image.gif&quote; title=&quote;An image&quote; alt=&quote;Display me if image.gif is missing&quote;>

Posted: Thu Jun 02, 2005 5:17 pm
by ddragas
Thank you for reply, but I don't think you've understood my question. I know what for is alt text, and i know how to write html code for it. Question was how to "pop-up" this alt text in mozilla like Internet explorers does?

Posted: Thu Jun 02, 2005 5:21 pm
by Roja
ddragas wrote:how do you "pop-up" this alt text in mozilla like Internet explorers does?
onion2k wrote:By putting the text in the title attribute as the HTML spec tells you to
Try *reading*.

Use the title attribute.

Posted: Thu Jun 02, 2005 5:30 pm
by ddragas
Sorry - my mistake

:oops:

Posted: Thu Jun 02, 2005 5:32 pm
by rashedkarim
Hi there,

You can do this using the title attribute of the <img> tag. Try this:

Code: Select all

<img title="this is an image" src="/myImagePath.jpg" />

Code: Select all

Now, when the mouse hovers over the image, 'this is an image' will show as a tooltip.