Bootstrap On Hover links got black background color (in Rails)


The last thing is noticeable in Rails

Solution

Actually when you create some controller or run scaffolding command in rails.

It also creates

app/assets/stylesheets/scaffolds.css.scss

which contains this css:


a {
  color: #000;
  &:visited {
    color: #666;
  }
 &:hover {
    color: #fff;
    background-color: #000;
  }  
}

To avoid this thing happening, remove this from above


 &:hover {
    color: #fff;
    background-color: #000;
  }  
Advertisements

I am Senior Software Engineer. I love reading, writing, sharing,developing, hiking, movies, trips, mountains, brooks, hills etc.

Tagged with:
Posted in Css, Ruby on Rails
2 comments on “Bootstrap On Hover links got black background color (in Rails)
  1. 王睿麒 says:

    Thank you, you’ve helped me quite a lot !! @ Taipei, Taiwan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

StackOverFlow
Categories
Archives
%d bloggers like this: