I have a link tag of rails like below
<%= link_to 'New Product', new_product_path %>
I want to increase the font size
of the New Product
and apply some CSS property to it.
Can I do that in the rails tag itself?
I have a link tag of rails like below
<%= link_to 'New Product', new_product_path %>
I want to increase the font size
of the New Product
and apply some CSS property to it.
Can I do that in the rails tag itself?
<%= link_to 'New Product', new_product_path, {style: 'font-size: 2em; color: black' } %>
But a nicer solution would be, to add a class to the link, and than style the class in a separate css-file.
<%= link_to 'New Product', new_product_path, class: 'myclass' %>
CSS-File:
.myclass {
font-size: 2em;
color: black;
}