I have a link on my page that lets me delete items from my database - I currently use CSS to insert a background image of a cross (an X). I want to display ''alt'' text explaining that the button deletes items from the db but I know this can''t be done with CSS. What is the rails code for doing this? Currently I have <%= link_to ''del'', :action=>:destroy %> The reason I need the alt text is becuase I have set the word ''del'' to be 0px so that it doesn''t appear on scree. I just want to have the button. Is there a way to make the image show ''alt'' txt when someone rolls over it? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> <%= link_to ''del'', :action=>:destroy %> >just use it the normal way instead: <%= link_to(image_tag("/images/icons/delete.png", :alt => "delete", :title => "delete"), :action => :destroy) %> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Also as an FYI: The "alt" attribute is used to provide alternate text for non-graphical clients and for screen readers. The correct attribute for tool tips is "title." Yes I realize that IE will display alt text as a tool tip, but IE is stupid and broken. Don''t beleive me? Then read the w3c specs on the two attributes and see for yourself. :) On Jun 17, 7:53 am, Thorsten Müller <thors...-1oxKqHKwyltBDgjK7y7TUQ@public.gmane.org> wrote:> > <%= link_to ''del'', :action=>:destroy %> > > just use it the normal way instead: > > <%= link_to(image_tag("/images/icons/delete.png", :alt => > "delete", :title => "delete"), :action => :destroy) %>--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you very much both of you! I will start using Title from now. Regds steve On Jun 18, 12:38 am, Robert Walker <r0b3rt4...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Also as an FYI: The "alt" attribute is used to provide alternate text > for non-graphical clients and for screen readers. The correct > attribute for tool tips is "title." Yes I realize that IE will display > alt text as a tool tip, but IE is stupid and broken. Don''t beleive me? > Then read the w3c specs on the two attributes and see for yourself. :) > > On Jun 17, 7:53 am, Thorsten Müller <thors...-1oxKqHKwyltBDgjK7y7TUQ@public.gmane.org> wrote: > > > > > > <%= link_to ''del'', :action=>:destroy %> > > > just use it the normal way instead: > > > <%= link_to(image_tag("/images/icons/delete.png", :alt => > > "delete", :title => "delete"), :action => :destroy) %>- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---