2014-02-20 114 views
0

我有一个radioButtonList我有ASP中的标签,radioButtonList正确显示,但它不与为它创建的标签对齐。RadioButtonList不与标签对齐,CSS问题

我究竟需要的是

1对齐radioButtonList与标签

2-单选按钮的标签必须接近单选按钮。

如下图所示;

enter image description here

我的ASP代码:

<div style="display: inline;" dir="rtl"> 
        <asp:Label ID="Label8" runat="Server" Text=" Permenat office"></asp:Label> 
       <asp:Label ID="Label35" runat="Server" Text="*" ForeColor="Red" Font-Bold="True"></asp:Label> 


       <asp:RadioButtonList runat="server" ID="rdlstPermenantOffice" > 
        <asp:ListItem>Yes</asp:ListItem> 
        <asp:ListItem>No</asp:ListItem> 
       </asp:RadioButtonList> 


       </div> 
+0

你知道,在默认情况下,单选按钮文本居右,对? – LcSalazar

+0

适合我。必须有一些你没有显示的CSS会影响这一点。 –

+0

@LcSalazar那么如果OP选择右边的按钮呢?这与问题无关。 –

回答

2

试试这个正常工作: -

<asp:RadioButtonList ID="rblChoose" runat="server" RepeatDirection="Horizontal" 
RepeatLayout="Flow"> 
    <asp:ListItem Text="a" Value="a" /> 
    <asp:ListItem Text="b" Value="b" /> 
</asp:RadioButtonList>