【问题标题】:Bootstrap form-inline DropDownLists with static width具有静态宽度的引导表单内联 DropDownLists
【发布时间】:2015-11-25 23:11:23
【问题描述】:

我有 3 个带有彼此内联标签的下拉列表。我正在尝试将 DropDown 的所有宽度设为静态 200 像素。相反,bootstrap 会覆盖并使其成为动态下拉列表始终是内部最宽项目的宽度。

<div class="form-inline">
    <div class="form-group">
        <asp:Label ID="lblDropDownList1" runat="server" Text="DDL 1 Label:" AssociatedControlID="ddlDropDownList1"></asp:Label>
        <telerik:RadDropDownList ID="ddlDropDownList1" runat="server" Width="200px" CssClass="form-control"></telerik:RadDropDownList>
    </div>

    <asp:Panel ID="pnlDropDownList2" runat="server" CssClass="form-group" Visible="false">
        <asp:Label ID="lblDropDownList2" runat="server" Text="DDL 2 Label:" AssociatedControlID="ddlDropDownList2"></asp:Label>
        <telerik:RadDropDownList ID="ddlDropDownList2" runat="server" Width="200px" CssClass="form-control"></telerik:RadDropDownList>
    </asp:Panel>

    <asp:Panel ID="pnlDropDownList3" runat="server" CssClass="form-group" Visible="false">
        <asp:Label ID="lblDropDownList3" runat="server" Text="DDL 3 Label:" AssociatedControlID="ddlDropDownList3"></asp:Label>
        <telerik:RadDropDownList ID="ddlDropDownList3" Width="200px" CssClass="form-control"></telerik:RadDropDownList>
    </asp:Panel>
</div>

【问题讨论】:

    标签: css asp.net twitter-bootstrap twitter-bootstrap-3


    【解决方案1】:

    制作一个具有设定宽度的容器 DIV。然后将下拉的宽度设置为小于该宽度,并且不应超出大小。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-15
      • 1970-01-01
      • 2015-03-13
      • 2015-12-11
      • 1970-01-01
      • 2018-10-31
      • 2017-04-17
      相关资源
      最近更新 更多