PDA

View Full Version : rollover on image and text appears


rph105
11-21-2007, 01:58 AM
ok ive got 5 stars (theyre images) and when you rollover each star i want it to say below '1 Star' for example and then '2 Stars', how can i do this

Thanks

tux
11-21-2007, 09:38 AM
Just use the alt attribute with your image.

In Dreamweaver code view.....

If you have this.....


<img src="/images/your_star_image.jpg">


change it to this......


<img src="/images/your_star_image.jpg" alt="your_text">


Or in Dreamweaver design view.....

Select the image and in the Properties add your text to the alt field.

Hope this helps, regards

Paul

d a v e
11-21-2007, 11:59 AM
well that's only going to work in IE ;)

you need the title attribute too

<img src="/images/your_star_image.jpg" alt="2 stars"> title="2 stars"

rph105
11-21-2007, 12:00 PM
well that's only going to work in IE ;)

you need the title attribute too

<img src="/images/your_star_image.jpg" alt="2 stars"> title="2 stars"

what i wanted was text actually appearing below it, not the alt name, like just text that i can customise, how would i be able to do that

tux
11-21-2007, 01:07 PM
what i wanted was text actually appearing below it, not the alt name, like just text that i can customise, how would i be able to do that

You could use a layer for your text and use the show/hide layer behavior. The layer will appear when the mouse hovers over the star.

I think CSS will do this but I'm not upto speed. Others on the forum will be able to help with CSS.

-------------

Dave,


well that's only going to work in IE ;)

you need the title attribute too

<img src="/images/your_star_image.jpg" alt="2 stars"> title="2 stars"


Thanks for that. I only play at building websites as a hobby and need to swat up on cross browser compatibility. You maybe able to give me some pointers. I'm just going to start a new post on this subject.

Regards, Paul

d a v e
11-21-2007, 02:11 PM
you could try this
http://www.communitymx.com/content/article.cfm?page=1&cid=52428