【问题标题】:How to set select box height in asp.net for DropDownCheckBoxes如何在 asp.net 中为 DropDownCheckBoxes 设置选择框高度
【发布时间】:2015-01-09 20:32:17
【问题描述】:

我无法在 asp.net 中为 DropDownCheckBoxes 设置选择框高度。我能够设置 SelectBoxWidth、DropDownBoxBoxWidth、DropDownBoxBoxHeight。 我什至尝试添加 SelectBoxCssClass 但不工作。第一张图片是我当前的输出。我正在尝试获得第二张图片中的输出

任何帮助表示赞赏

 <asp:DropDownCheckBoxes ID="DdlProject" runat="server"   OnTextChanged="DdlProject_TextChanged"
                         AddJQueryReference="true" AutoPostBack="true" CssClass="dd_chk_select" OnSelectedIndexChanged="DdlProject_SelectedIndexChanged" >
                          <Style SelectBoxWidth="120" DropDownBoxBoxWidth="120"  DropDownBoxBoxHeight="120" DropDownBoxCssClass="btn-default dropdown-toggle" SelectBoxCssClass="btn-default dropdown-toggle dd_chk_select"/>
                          <Texts SelectBoxCaption="Select Project" />
                       </asp:DropDownCheckBoxes>

.dd_chk_select {
height: 30px;
text-align: center;
border-radius: 5px;

}

【问题讨论】:

  • 以您的风格尝试将标签设置为重要height: 100px !important;
  • 那行得通。谢谢!!
  • 欢迎您,我已将其添加到答案中

标签: css asp.net .net


【解决方案1】:

按照你的风格尝试将标签设置为重要

.dd_chk_select {
    height: 100px !important;
    text-align: center;
    border-radius: 5px;
}

你说它有效,这意味着你的高度样式在某个地方被覆盖了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-09-20
    • 1970-01-01
    • 1970-01-01
    • 2016-08-05
    • 1970-01-01
    • 2016-08-09
    • 2018-05-21
    相关资源
    最近更新 更多