Rails 2.3.5 (Running in Development Mode on localhost)
I haven't been able to find an answer for this. In IE8 and FF, the alts (tooltips) do not appear on mouseover. Yet for some reason in IE7 they do. I'd guess this is some basic knowledge I'm missing or there's something in my stylesheets that's killing the tooltips in IE7/IE8? I'm not using a tooltip script or plugin.
The two main ways I'm using image_tags:
<%= image_tag("show_group.png", :size => "64x64", :alt => "Show Group") %>
<%=link_to image_tag ("menu_icon_make_new_item.png", :size => "38x27", :alt =>
"Make new item", :id => 'item_select_menu', :class => 'nothing2'), {},
:onclick =>'dialog_back_to_new_item_select_menu(); return false' %>
Although I'm pretty sure it's not a Rails thing because even this hand coded img tag doesn't show it's alt on hover in IE8/FF (but does show it in IE7).
<span id="show_user_panel_arrow"><img src="\images\user_panel_expand.png"
alt="show bulk user panel" id="user_panel_arrow" /></span>
Thanks!
alt
is the wrong attribute for tooltips. Old versions of IE improperly used the alt attribute for mouseover titles. alt is the alternative text that gets displayed if the image does not come up.
Use the title
attribute.
example:
<img src="mypic.jpg" alt="Description" title="This shows up on mouseover" />
Use title option to display text in rails 3.
<%= image_tag 'show_group.png',:title => 'show_group' %>
When mouse hover over the show_group.png , it will show the text "show_group".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With