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.
Aa776a6aaefaabca63e989e7042da5e2?d=identicon&s=25 cranberry (Guest)
on 2006-04-06 16: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
D5145c421cd25af6fa577c15219add90?d=identicon&s=25 unknown (Guest)
on 2006-04-06 17:03
(Received via mailing list)
<a href="..." class="foo">
Ec5a599777854c540fd102ef4691fe10?d=identicon&s=25 Rimantas Liubertas (Guest)
on 2006-04-06 17: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.