Using prefix and suffix form api layout I have created a form, though I'm having an issue with using the prefix and suffix to place items into rows rather than the list they appear as standard.

For example I have these 3 form elements, how would I go from having them appear as standard on a new line, to on the same line. Normally I would just chuck them into a table and place each one in a different column. I have read that I should possibly use floats?

I have tried  '#prefix' =&gt; '&lt;div style="float: left; width 200px;"&gt;',

'#suffix' =&gt; '&lt;/div&gt;&lt;br&gt;' , But this seems to affect the navigation on the left and shuffle it down.

$form['orange'] = array(
    '#type'=&gt;'select',
    '#title' =&gt; t('Select Orange'),
    '#options' =&gt; $Orange,
    '#multiple' =&gt; false,
    '#prefix' =&gt; ,
    '#suffix' =&gt; ,
    '#attributes'=&gt;array('size'=&gt;0),
    '#required' =&gt; TRUE,
);
$form['apple'] = array(
    '#type'=&gt;'select',
    '#title' =&gt; t('Select apple'),
    '#options' =&gt; $apple,
    '#multiple' =&gt; false,
    '#prefix' =&gt; ,
    '#suffix' =&gt; ,
    '#attributes'=&gt;array('size'=&gt;0),
    '#required' =&gt; TRUE,
);
$form['strawberry'] = array(
    '#type'=&gt;'select',
    '#title' =&gt; t('Select strawberry'),
    '#options' =&gt; $strawberry,
    '#multiple' =&gt; false,
    '#prefix' =&gt; ,
    '#suffix' =&gt; ,
    '#attributes'=&gt;array('size'=&gt;0),
    '#required' =&gt; TRUE,

);


I cannot answer for 7 hours but here it is:

The solution was to close the DIV, I had forgotten, which meant the styling was effecting the whole page.

     '#prefix' =&gt; '&lt;div style="float: left; width 200px;"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;&lt;br style="clear: left;" /&gt;&lt;/div&gt;',
    [Useful link to aligning form elements horizontally][1]
I think you want to keep it in table. Lets try with putting it in one like this --

$form['orange'] = array(
    '#type'=&gt;'select',
    '#title' =&gt; t('Select Orange'),
    '#options' =&gt; $Orange,
    '#multiple' =&gt; false,
    '#prefix' =&gt; '&lt;table&gt;&lt;tr&gt;&lt;td&gt;',
    '#suffix' =&gt; '&lt;/td&gt;',
    '#attributes'=&gt;array('size'=&gt;0),
    '#required' =&gt; TRUE,
);
$form['apple'] = array(
    '#type'=&gt;'select',
    '#title' =&gt; t('Select apple'),
    '#options' =&gt; $apple,
    '#multiple' =&gt; false,
    '#prefix' =&gt; '&lt;td&gt;',
    '#suffix' =&gt; '&lt;/td&gt;',
    '#attributes'=&gt;array('size'=&gt;0),
    '#required' =&gt; TRUE,
);
$form['strawberry'] = array(
    '#type'=&gt;'select',
    '#title' =&gt; t('Select strawberry'),
    '#options' =&gt; $strawberry,
    '#multiple' =&gt; false,
    '#prefix' =&gt; '&lt;td&gt;',
    '#suffix' =&gt; '&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;',
    '#attributes'=&gt;array('size'=&gt;0),
    '#required' =&gt; TRUE,

);


I haven't tested this code, so please try this &amp; let me know if it works :)