Michael Satterwhite wrote:> I have an image that I''m needing to display and do a link to
another in
> a popup window. I found the link_to_image helper, but I''m having a
> problem with it. I need to control the size of the first displayed image
> (the anchor). It needs to have
> width="100%" height="100%" added to the image tag in
order to keep
> the anchor image from displaying way too large. The code I''m using
right
> now is
>
> <%= link_to_image ( @elevated, @elevated, :popup => [''New
Window''] )
> %>
>
> What should I add to get width="100%" height="100%"
included in the
> source img tag?
>
> Thanks in advance
> ---Michael
I think link_to_image is deprecated in favor of a link_to() with an
image_tag() as the first parm, like the following:
<%= link_to(image_tag(''button.gif'', :width =>
"100%", :height =>
"100%"), {:controller => ''controller'', :action
=> ''action''})
However - you should really control your presentation elements with CSS
styling instead of the width= and height= attributes on the img tag.
c.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---