Twitter bootstrap displays button with greyed text

前端 未结 4 1058
臣服心动
臣服心动 2021-01-04 09:32

I\'m using Twitter Bootstrap as a framework on my Ruby on Rails application.

I use link_to to generate links that are styled as buttons, with the follow

相关标签:
4条回答
  • 2021-01-04 09:40

    Did you run a scaffold generator? Scaffold.css will cause this. If you remove it you'll be good to go.

    You can also run the generator with --skip-stylesheets to prevent them being created

    0 讨论(0)
  • 2021-01-04 09:42

    Don't entirely delete your scaffold.css folder, just delete the contents and leave the folder there. If you generate scaffold at some other point again, especially if you're in beginning dev stages, the folder will probably come back and you will have the same problem. So if you just delete the contents, it's kind of the same thing and the system won't add another folder in the future.

    0 讨论(0)
  • 2021-01-04 09:56

    Simply add :style to your button.

    <%= link_to 'New Event', url_for(:action => 'new', :controller => 'events') , :class => "btn btn-primary btn-mini", :style=>'color:#FFFFFF;' %>
    
    0 讨论(0)
  • 2021-01-04 09:59

    In case you already have a application running and you decide to install bootstrap AND don't have Scaffold.css anymore, you can just add this to your bootstrap.css at the parte where buttons properties are defined (mine: line 2726):

    .btn:visited { 
    color: #FFF
    }
    
    0 讨论(0)
提交回复
热议问题