2012-03-24 93 views
0

嗨,我在移动应用程序,我试图创建一个水平单选按钮全宽度为33%的每个按钮。jquery mobile horizo​​ntal radiobutton equal buttons页面的百分比

这里是我的代码

   items.push('<div id="id' + i + '" data-role="fieldcontain"><fieldset data-role="controlgroup" data-type="horizontal" class="row_b">'); 
       items.push('<input type="radio" name="radio'+ i +'-choice-1" id="radio'+ i +'-choice-1" value="choice_1" /><label for="radio'+ i +'-choice-1">test1</label>'); 
       items.push('<input type="radio" name="radio'+ i +'-choice-1" id="radio'+ i +'-choice-2" value="choice_2" /><label for="radio'+ i +'-choice-2">test2</label>'); 
       items.push('<input type="radio" name="radio'+ i +'-choice-1" id="radio'+ i +'-choice-3" value="choice_3"/><label for="radio'+ i +'-choice-3">Clear</label>'); 
       items.push('</fieldset></div>'); 

       html += items.join(''); 

       list.append(html).trigger('create'); 

我尝试此解决方案JQueryMobile radio buttons with fieldcontain width issue on desktop但它不适合我的作品......

我的HTML是遵循

.row_b .ui-btn { 
    text-align: center; 
    width: 33%; 
} 

请指教

回答