jQuery MiniUI

标题: RadioButtonList如何居中 [打印本页]

作者: cf4000    时间: 2018-7-9 18:43:09     标题: RadioButtonList如何居中

如下图所示,在 table 中的 RadioButtonList 如何居中?设置了text-align:center无效
[attach]11085[/attach]

作者: dforce    时间: 2018-7-10 10:47:36

宽度设置100%了吗?
作者: cf4000    时间: 2018-7-10 11:12:16

dforce 发表于 2018-7-10 10:47
宽度设置100%了吗?

设置了
<td style="width:100%;text-align:center;">
    <input id="rbl1" name="rbl1" class="mini-radiobuttonlist" style="width:100%;text-align:center;" data="[{ id: 0, text: 'A类' }, { id: 1, text: 'B类' }, { id: 2, text: 'C类' }, { id: 3, text: 'D类' }]" value="0"/>
</td>
作者: dforce    时间: 2018-7-10 13:28:20

cf4000 发表于 2018-7-10 11:12
设置了

用样式来控制吧
  1.    <style>
  2.       .mini-radiobuttonlist table
  3.       {
  4.           margin:0 auto;
  5.           }
  6.     </style>
  7. <table style="width:600px;">
  8.   <tr>
  9.      <td style="width:100%;text-align:center;">
  10.        <input id="rbl1" name="rbl1" class="mini-radiobuttonlist" repeatLayout="flow" style="width:100%;text-align:center;" data="[{ id: 0, text: 'A类' }, { id: 1, text: 'B类' }, { id: 2, text: 'C类' }, { id: 3, text: 'D类' }]" value="0"/>
  11.     </td>
  12.   </tr>
  13.   <tr>
  14.      <td>
  15.          <textarea class="mini-textarea" id="t2" style="width:100%"></textarea>
  16.      </td>
  17.   </tr>
  18. </table>
复制代码

作者: cf4000    时间: 2018-7-10 15:28:01

dforce 发表于 2018-7-10 13:28
用样式来控制吧

好的,谢谢!




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2