1

这应该很容易。如何将单选按钮列表居中?过去并不难。下面的 HTML 不起作用。我错过了什么?

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table style="width:100%">
                  <tr>
                      <td  style="text-align: center">
                          <asp:RadioButtonList ID="radUserType" runat="server" 
                              RepeatDirection="Horizontal">
                          </asp:RadioButtonList>
                      </td>
                  </tr>
           </table>
    </div>
    </form>
</body>
</html>
4

2 回答 2

1

重复布局="流"

在跨度而不是表中呈现 RadioButtonList。

于 2015-09-23T14:29:00.653 回答
0

尝试使用 td 属性:

<td align="center"> 
      <asp:RadioButtonList ID="radUserType" runat="server" 
       RepeatDirection="Horizontal">
       </asp:RadioButtonList>
</td>
于 2012-09-07T14:43:50.767 回答