jQuery MiniUI

 找回密码
 立即注册
查看: 5725|回复: 4
打印 上一主题 下一主题

RadioButtonList如何居中 [复制链接]

Rank: 4

跳转到指定楼层
楼主
发表于 2018-7-9 18:43:09 |只看该作者 |倒序浏览
如下图所示,在 table 中的 RadioButtonList 如何居中?设置了text-align:center无效

附件: 你需要登录才可以下载或查看附件。没有帐号?立即注册

Rank: 8Rank: 8

沙发
发表于 2018-7-10 10:47:36 |只看该作者
宽度设置100%了吗?

Rank: 4

板凳
发表于 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>

Rank: 8Rank: 8

地板
发表于 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>
复制代码

Rank: 4

5#
发表于 2018-7-10 15:28:01 |只看该作者
dforce 发表于 2018-7-10 13:28
用样式来控制吧

好的,谢谢!

Archiver|普加软件

GMT+8, 2025-7-8 07:03 , Processed in 1.025588 second(s), 11 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部