Forum: Ruby on Rails Quick Question: Using a CSS class statement in a link_to tag

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
cranberry (Guest)
on 2006-04-06 18:41
Hi,
I have a css file with lots of classes. I want different links on my
page (which all use the 'link_to' tag) to belong to different classes so
that I can format their font, size, color, etc.

Where or how do I use the css class name in the link_to tag?

Thank you very much
unknown (Guest)
on 2006-04-06 19:03
(Received via mailing list)
<a href="..." class="foo">
Rimantas L. (Guest)
on 2006-04-06 19:15
(Received via mailing list)
> I have a css file with lots of classes. I want different links on my
> page (which all use the 'link_to' tag) to belong to different classes so
> that I can format their font, size, color, etc.
>
> Where or how do I use the css class name in the link_to tag?
>


<%= link_to 'example', {:action => "index", :id => @item}, :class =>
"myclass" %>


Regards,
Rimantas
--
http://rimantas.com/
This topic is locked and can not be replied to.