Reputation: 328
I'm using these tags together
<div class ="btn btn-warning offset3 span2" ><%=link_to "Enter Info", info_path%></div>
The outcome is that the link (a) tag overrides the text color property. It doesn't look good on a colored button. So I want to change the properties of a link when used with btn to plain white. Any ideas how to make that happen?
Upvotes: 4
Views: 5101
Reputation: 17735
You don't need the div
- you can apply those classes directly to the anchor:
<%= link_to "Enter Info", info_path, class: "btn btn-warning offset3 span2" %>
That way the link is styled as a button, overriding all default link styles.
Upvotes: 7
Reputation: 328
I was able to solve this one using the like this:
<div class ="btn btn-warning offset3 span2" ><%=link_to "Enter Info", info_path, :style => "color:#ffffff"%></div>
Upvotes: 0