I am using twitter bootstrap and I have some code like this:
<%= link_to "Create", new_something_path %>
which renders the text in a light blue color, highlighting it as a link.
How would I reference that element to change it via css?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can add a CSS class or id to a
link_toby setting it in thehtml_optionshash, which is the last parameter of thelink_tohelper.For example, using Ruby 1.9 hash syntax (convert to
:key => 'value'if using Ruby 1.8):Just the CSS selector
.new-something-class:<%= link_to "Create", new_something_path, class: 'new-something-class' %>or for a link with with the CSS selectors
#new-something-idand.new-something-class:<%= link_to "Create", new_something_path, class: 'new-something-class', id: 'new-something-id' %>You could then reference this element in your
.cssfile(s) as usual.