How to remove Bold from f.label

56,060

Solution 1

I fixed this problem overriding the label

label {
    font-weight: normal !important;
}

Thanks to @vucko who gave me help.

Solution 2

As I only sometimes want a non-bold label text, I solved it by using a css class in the label helper:

<%= label :model, :fieldname, class: "not-bold" %>

And in the stylesheet:

.not-bold {font-weight:normal !important;}
Share:
56,060
kamusett
Author by

kamusett

Got Science Computer degree and currently works on IT area developing in RoR.

Updated on September 18, 2020

Comments

  • kamusett
    kamusett over 3 years

    I'm stylizing a webpage developed on Rails.

    So, I have a form with the checkbox of password remember. The problem Is it is always on bold and I can't change it. I've changed successfully the font-style, to italic, the color, but I couldn't remove the bold that was set as default (I guess).

    Below my code:

            <% if devise_mapping.rememberable? -%>
                <div class="remember_forgot_top remember_me_position"><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
            <% end -%>
    

    Someone knows how to remove the bold and how to stylize the label?

    PS: I'm using twitter bootstrap.