将文本框对齐到单选按钮列表项的右侧 [英] Align textbox to right of radiobuttonlist listitem

查看:59
本文介绍了将文本框对齐到单选按钮列表项的右侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将.NET WebForms页面略微升级到Bootstrap3.我需要维护一个功能,该功能在没有Bootstrap的情况下仍能正常工作.我需要在单选按钮标签右侧添加一个小文本框.就像,如果选择其他",你需要自由形式的文本还有什么其他手段.

I'm trying to do a slight upgrade of a .NET WebForms page to Bootstrap 3. I need to maintain a feature that worked fine without Bootstrap. I need a small textbox to the right of a radio button label. Like, when selecting "Other" you need to free form text what other means.

在上面的示例中,我只需要文本框向上移动,而不是整个表单那么宽.

In the sample above, I just need the textbox to move up and not be as wide as the entire form.

这是我当前的代码:

<div class="form-group">
    <asp:Label ID="Ethnicity_Label" runat="server" Text="Ethnicity" CssClass="col-xs-12 col-sm-3 control-label"></asp:Label>
    <div class="col-xs-12 col-xs-push-1 col-sm-9 col-sm-push-0 radio radiobuttonlist">
        <asp:RadioButtonList ID="Ethnicity" runat="server" ValidationGroup="applicationForm" RepeatLayout="Flow">
            <asp:ListItem Text="Multi-Racial" Value="Multi-Racial" />
            <asp:ListItem Text="Other Ethnicity" Value="Other Ethnicity" />
        </asp:RadioButtonList><span class="col-xs-4 col-xs-push-3"><asp:TextBox ID="OtherEthnicity" runat="server" MaxLength="250" ValidationGroup="applicationForm" CssClass="form-control" /></span>
    </div>
</div>

推荐答案

我通过放置文本框来解决.感觉很脏,但是可以用.宁愿让它在列表项的流中工作.

I solved by positioning the textbox. Feels dirty but it works. Would have rather made it work within the flow of the list items.

这篇关于将文本框对齐到单选按钮列表项的右侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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