在 asp:Radiobuttonlist 中对齐文本
Align text in asp:Radiobuttonlist
下图是我的问题的现状
如何让文字紧跟在单选按钮之后?下面是我的代码:
<div class="form-group">
<div class="col-sm-2">
<asp:Label ID="AutoContra" CssClass="control-label" runat="server" Font-Bold="true">Auto Contra</asp:Label>
</div>
<div class="col-sm-1">:</div>
<div class="col-sm-2">
<asp:RadioButtonList ID="autcon" runat="server" CssClass="radio" RepeatLayout="Flow" RepeatDirection="Horizontal">
<asp:ListItem Text="Yes" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:RadioButtonList>
</div>
<div class="col-sm-1"><span style="color:red;">*</span></div>
</div>
有帮助吗?谢谢!
使用单选按钮 css
样式 cssclass="rbl"
<style type="text/css">
.rbl input[type="radio"]
{
margin-left: 20px;
margin-right: 5px;
}
</style>
<asp:RadioButtonList ID="autcon" runat="server" CssClass="rbl" RepeatLayout="Flow" RepeatDirection="Horizontal">
<asp:ListItem Text="Yes" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:RadioButtonList>
下图是我的问题的现状
如何让文字紧跟在单选按钮之后?下面是我的代码:
<div class="form-group">
<div class="col-sm-2">
<asp:Label ID="AutoContra" CssClass="control-label" runat="server" Font-Bold="true">Auto Contra</asp:Label>
</div>
<div class="col-sm-1">:</div>
<div class="col-sm-2">
<asp:RadioButtonList ID="autcon" runat="server" CssClass="radio" RepeatLayout="Flow" RepeatDirection="Horizontal">
<asp:ListItem Text="Yes" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:RadioButtonList>
</div>
<div class="col-sm-1"><span style="color:red;">*</span></div>
</div>
有帮助吗?谢谢!
使用单选按钮 css
样式 cssclass="rbl"
<style type="text/css">
.rbl input[type="radio"]
{
margin-left: 20px;
margin-right: 5px;
}
</style>
<asp:RadioButtonList ID="autcon" runat="server" CssClass="rbl" RepeatLayout="Flow" RepeatDirection="Horizontal">
<asp:ListItem Text="Yes" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:RadioButtonList>