需要帮助在MVC中对齐单选按钮

med*_*eda 2 alignment radiobuttonfor asp.net-mvc-4

我很难使用RadioButtonFor在MVC 4模板中左侧对齐单选按钮.

由于某种原因,他们被放置在中间,abd它只发生在下面的单选按钮是一张图片:

我试图浮动div但它没有用.

我还尝试将css类添加到单选按钮帮助程序,但我收到函数RadioButtonFor的重载错误

我甚至试着把它放进一张桌子里

请指教,这是我的代码

<div class="editor-field"  >
<table>
<tr>
    <td>
           @Html.RadioButtonFor(model => model.isChildTakingMedicine, true, new { @onchange = "showTextBox()" }) YES<br />
    </td>
</tr>
<tr><td>
            @Html.RadioButtonFor(model => model.isChildTakingMedicine, false, new { @onchange = "showTextBox()" }) NO
            @Html.ValidationMessageFor(model => model.isChildTakingMedicine)
     </td> 
</tr>
</table>  
</div>
Run Code Online (Sandbox Code Playgroud)

med*_*eda 6

单选按钮的宽度为宽,默认css为所有输入标签提供了较大的宽度.

添加了以下CSS来修复它:

input[type="radio"]  
{
       width: 20px;   
}
Run Code Online (Sandbox Code Playgroud)