css - Rails: Simple_form on one line? -
i making form simple_form, , i'm trying inputs on same line (i want elements inline horizontally on rendered page).
i have googled problem hours, couldn't find solution works.
the simple_form code:
<%= simple_form_for(@post, :html => {:class => 'form-inline' }) |f| %> <%= f.input :link, label: false, placeholder: "here..." %> <%= f.input :type, as: :radio_buttons, collection: [['<span class="add-on"><i class="icon-on icon-white"></i></span>'.html_safe, '0'], ['<span class="add-on"><i class="icon-off icon-white"></i></span>'.html_safe, '1'], ['<span class="add-on"><i class="icon-on icon-white"></i> + <i class="icon-of icon-white"></i></span>'.html_safe, '2']], item_wrapper_class: 'inline', label: false %> <%= button_tag(type: 'submit', class: "btn btn-inverse") %> <i class="icon-ok icon-white"></i> <% end %> <% end %>
any solution this?
simple_form creates form containing div each input. each div contains label , input field
so css should like:
.form-inline div { display: inline-block }
Comments
Post a Comment