Twitter Bootstrap using block level labels and inputs

I use the Twitter boot tray for Rails / SASS and notice that it uses the display: block; style display: block; to my labels , label inputs and label textareas .

I use form tags to create a checkmark with a label, but the block style moves two to another line:

  <%= f.check_box :remember_me %> <%= f.label :remember_me %> 

My question is double. Should I do this? and if so, how much better should I override Twitter Bootstraps defaults. I would prefer not to have many !important flags in my CSS if I can avoid this.

+7
source share
1 answer

you can do this by bootstrap and pass to the shortcuts block

 <%= f.label :remember_me, :class => "checkbox" do %> <%= f.check_box :remember_me %>remember me <% end %> 

this way the checkbox also gets checkt if you click on the text. Much nicer!

+13
source

All Articles