[Rails] Quick Question: Using a CSS class statement in a link_to tag

Rimantas Liubertas rimantas at gmail.com
Thu Apr 6 15:13:21 GMT 2006


> 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/


More information about the Rails mailing list