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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -