2012-03-24 30 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%; 
} 

請指教

回答