如何垂直对齐单选按钮 [英] How Do I Vertically Align The Radio Buttons

查看:81
本文介绍了如何垂直对齐单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用< asp:RadioButton>时,我如何进行垂直对齐?我不能使用radiobuttonList,因为我需要为每个单选按钮都有一个id。



< asp:RadioButton ID =Question1_Option1Text =runat =server GroupName =GroupQuestion1/>

< asp:RadioButton ID =Question1_Option2Text =runat =serverGroupName =GroupQuestion1/>

< asp:RadioButton ID =Question1_Option3Text =runat =serverGroupName =GroupQuestion1/>



请指导我

How do i have vertical align when i am using <asp:RadioButton> I cannot use radiobuttonList because i need to have an id for each Radio button.

<asp:RadioButton ID="Question1_Option1" Text="" runat="server" GroupName="GroupQuestion1"/>
<asp:RadioButton ID="Question1_Option2" Text="" runat="server" GroupName="GroupQuestion1"/>
<asp:RadioButton ID="Question1_Option3" Text="" runat="server" GroupName="GroupQuestion1"/>

Kindly guide me

推荐答案

最好的方法是使用有序列表
The best way to do this is by using ordered list
<ol></ol>

或无序列表

<ul></ul>





将所有单选按钮放在ul的li标签中。像这样。





Place all your radio buttons in a li tag of an ul. like this.

<ul>
<li>
<asp:radiobutton id="Question1_Option1" text="" runat="server" groupname="GroupQuestion1" xmlns:asp="#unknown" />
</li>
<li>
<asp:radiobutton id="Question1_Option2" text="" runat="server" groupname="GroupQuestion1" xmlns:asp="#unknown" />
</li>
<li>
<asp:radiobutton id="Question1_Option3" text="" runat="server" groupname="GroupQuestion1" xmlns:asp="#unknown" />
</li>
</ul>


您可以使用 css



有很多选项这里。 [ ^ ]。



-KR
You can do it by using css.

Plenty of options are available here.[^].

-KR


这篇关于如何垂直对齐单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆