how to put a RadioButtonList in one row

there is a activeRadioButtonList use default params showed in multi rows,like this:



php souces code is

<?php echo $form->radioButtonlist($model,'needreport',$model->getneedReport()); ?>

web souces code:

<div class="row">

		<label for="testitem_">need report?</label>

		<input id="yttestitem_needreport" type="hidden" value="" name="testitem[needreport]" />

<span id="testitem_needreport">

<input id="testitem_needreport_0" value="0" type="radio" name="testitem[needreport]" /> 

<label for="testitem_needreport_0">是</label><br/>

<input id="testitem_needreport_1" value="1" type="radio" name="testitem[needreport]" /> 

<label for="testitem_needreport_1">否</label></span>			</div>

how to put these RadioButton in one row


Try change the $htmlOptions[‘separator’] to another value.



something like this

<?php echo $form->radioButtonlist($model,'needreport',$model->getneedReport(),array('separator'=>'&nbsp;&nbsp;&nbsp;')); ?>

still fail,but when rendered without layout,it’s ok.

css’s problem?where is point?

this is working for me… <_<

Thank you all the same

I think you are right. It should be a problem of css.

Use the developer’s tool of your browser to check what style is applied to the labels.