ruby on rails - Include two inputs in same LI element in Formtastic -
Using the formattic, I have a volume field and unit field that is measured in the amount of items and the unit that is measured in it. My problem is that I would like to display the unit box with the volume box. However, because it's structural past in every input element in its own element, I can not appear next to each other. Any thoughts? Use an html wrapper for your volume and unit fields: & lt;% = form.input: Quantity: wrapper_html = & gt; {: Class = & gt; 'Fl'}%> & Lt;% = form.input: unit ,: wrapper_html = & gt; {: Class = & gt; 'Fl'}%> And to float a CSS float property li in my CSS (probably formtastic-changes.css), I used to give some cells to breathe unit labels to some extent Added correct margins: form.formtastic fieldet ol li.fl {float: left; Margin-right: 2 AM;} You must have specific classes or IDs for wrapper_html and Bella with CSS to get your layout. / P>