Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net RadioButton列表未与标签对齐,CSS问题_Asp.net_Css - Fatal编程技术网

Asp.net RadioButton列表未与标签对齐,CSS问题

Asp.net RadioButton列表未与标签对齐,CSS问题,asp.net,css,Asp.net,Css,我有一个radioButtonList,我在ASP中为其设置了标签,radioButtonList显示正确,但未与为其创建的标签对齐 我真正需要的是 1-将RadioButton列表与标签对齐 2-单选按钮的标签必须靠近单选按钮。 如下图所示 我的ASP代码: <div style="display: inline;" dir="rtl"> <asp:Label ID="Label8" runat="Server" Text=" Per

我有一个
radioButtonList
,我在
ASP
中为其设置了标签,
radioButtonList
显示正确,但未与为其创建的标签对齐

我真正需要的是

1-将
RadioButton列表
与标签对齐

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

如下图所示

我的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>

对
不

试试这个,效果很好:-

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


您知道,默认情况下,单选按钮上的文本位于右侧,对吗?对我有效。一定有一些你没有显示的CSS会影响这一点。@LcSalazar那么如果OP选择将按钮放在右边怎么办?这与问题无关。对不起@Lister先生,OP列举了他想要解决的两个问题。但他提供了一个他试图实现的形象,而仅仅解决对齐问题(遵循既定的两个步骤)并不能给他在形象上显示的确切结果。我的意图是总结,而不是批评。@LcSalazar-Hm,现在你这样解释。。。是的,OP的文本可以这样解释。我把这张照片作为他现在拥有的东西的屏幕截图,红色箭头表示黑色标签应该放在哪里(即靠近单选按钮)。但我可能错了。让我们听听OP有什么要说的。