【问题标题】:Dropdownlist wrong display in ieie中的下拉列表错误显示
【发布时间】:2013-03-06 04:06:07
【问题描述】:

我在 IE6、7 和 8 中使用 DropDownList 控件(ASP.NET、VB)。

我的 DropDownList 控件设置为 200px 宽度,但项目列表更长,并且显示被裁剪。

我尝试过使用带有属性(“title”)的工具提示,但没有成功。

我该怎么办?

(我绑定了数据表中的项目,所以我在 html 中没有 <select> <options>

【问题讨论】:

  • 去掉固定宽度即可。

标签: asp.net vb.net internet-explorer


【解决方案1】:

一旦页面呈现,您可以通过 JQUERY 覆盖下拉的宽度。

$(document).ready(function(){

$("#dropdownID").addClass("ddlwidth")
});

在 CSS 中创建一个类

.ddlwidth{width:500px !important;}

!important 将用当前值覆盖宽度

【讨论】:

    猜你喜欢
    • 2017-04-02
    • 1970-01-01
    • 2018-09-08
    • 2014-06-05
    • 2012-02-18
    • 2011-08-27
    • 2020-01-22
    • 2012-03-04
    • 1970-01-01
    相关资源
    最近更新 更多