I'm trying to change the font-size and the spacing between the input box and label, in a form I've generated with the simple_form gem, 2.0.2. I'm sure there's a way to do this?
At present I have:
<%= f.input :comment, :input_html => { :wrap => :soft, :rows => 2}, :label => 'Type in box below:', :item_wrapper_class => 'type' %>
And in my css:
.type{
font-size: 24px;
margin-top: 15px;
}
I read in a post on this site that 'item_wrapper_class' would do the trick, but when I go to inspect element in Chrome, over the 'Type in box below:' part, it doesn't even pick up on the .type class, in my css - it just goes to the default label class, in bootstrap.
Any help would be appreciated, thanks.
This worked for me:
<%= f.input :comment, :input_html => { :wrap => :soft, :rows => 2}, :label => 'Type in box below:', :label_html => { :class => 'type' } %>
Have you tried something like this?
<%= f.input :comment, :input_html => { :wrap => :soft, :rows => 2}, :label => 'Type in box below:', wrapper_html: { class: 'type' } %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With