How to change the color of Bootstrap links

dodgerogers747 picture dodgerogers747 · Sep 18, 2012 · Viewed 15.3k times · Source

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?

Answer

rocket scientist picture rocket scientist · Sep 18, 2012

Give the link a class name

<%= link_to 'Create', new_something_path , :class => "newsomething"%>

add the following to your CSS.SCSS file

 a.newsomething{
      color: #000;
      &:hover {
         color: #000;
       }
     }