Meltemi
Meltemi

Reputation: 38359

Some underline & color relics in my bootstrapped buttons

I have a relatively vanilla Rails application with the bootstrap-sass gem providing Twitter Bootstrap awesomeness.

Problem is with my buttons. I'm getting blue text and underlined text on hover and not sure why or how to get rid of it. I'm wondering if it's because these are link tags and not submit tags?!? Regardless, how to make them appear as true buttons?

enter image description here

I've removed everything from my stylesheets except @import "bootstrap";

They should appear like this.

Any ideas? Here's the view code but it buttons appear the same way in other views...grouped and on their own.

%table.table.table-hover
  %thead
    %tr
      %th Title
      %th Filename
      %th

  %tbody
    - @reports.each do |report|
      %tr
        %td= report.title
        %td= report.filename
        %td
          .btn-group
            %button.btn= link_to 'Show', report
            %button.btn= link_to 'Edit', edit_report_path(report)
            %button.btn= link_to 'Destroy', report, method: :delete, data: { confirm: 'Are you sure?' }

Upvotes: 0

Views: 1569

Answers (5)

duykhoa
duykhoa

Reputation: 2302

I don't know the solution, but I suggest you to use Inspect Elements in Firefox or Chrome to find your problem!

Upvotes: 1

Rodrigo Zurek
Rodrigo Zurek

Reputation: 4575

i think that you still have the scaffold.css that the scaffold comand generates.

Upvotes: 0

Mark
Mark

Reputation: 5720

Buttons with the class btn in bootstrap do not use text-decoration: underline. This might be an issue if you aren't including the reset.css thats included in bootstrap which is now really a browser normalize then a reset. But I believe the un-styling of basic anchor tags is being done there.

Upvotes: 0

RyanB
RyanB

Reputation: 707

Have you considered using button_to?

%button.btn= button_to 'Show', report, method: :get

Reference, (button syntax) Button_to uses POST Link_to uses GET, why? ROR

Upvotes: -1

athal7
athal7

Reputation: 11

I'm guessing it has to do with the bootstrap-sass gem. I have never used that one, but I have used bootstrap-rails (which uses less).

You can certainly override the active and/or hover state with :active or :hover on your selectors in any css/sass file that gets evaluated after bootstrap.

Upvotes: 1

Related Questions