Text/Popup when holding cursor over picture

B

Bubbles

Hi

Is there an easy way to get a text popup when holding the cursor over a
picture?
I don't want to click and then get a window with an explanation, but an
short explanation in writing.

I'we tried layers, but couldn't get it to work.

I've thougth the <alt>-tag could do this?
 
M

Murray

There is no <alt> tag. There is an alt attribute of the <img> tag. But
that's not what you need to use since it should only be displayed when the
visitor has turned off images in the browser. Use the title attribute,
e.g.,

<img alt="this should not be displayed" title="but this will" ...>
 
M

Murray

Oops - I didn't mean to imply that you should not use the alt attribute!
You *should* use it for all images that are important to the message of the
page, but you should not use it as a 'tooltip' (which is what you call the
little pop-up).
 
B

Bubbles

Okay - thanks :)

But what if I want to show the text when the user has pictures enabled?
The picture shows, and if the user holds his cursor over the picture he also
gets a text showing.

Murray skrev:
 
B

Bubbles

OK - I didn't get it to work so I try again :)
Thank you for quick and good answers!


Murray skrev:
 
M

Murray

You're welcome! You will have to add that title attribute manually. If it
is not working for you, then please show me your code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top