html - 无法使用 Chosen 插件更改下拉列表的宽度

标签 html css forms jquery-chosen

我正在使用 Chose 插件并为其设置样式,但遇到了这个问题:

这是由生成 HTML 引起的:

    <div id="sel1WY_chzn" class="chzn-container chzn-container-single" style="width: 300px;>
//this is width of container
  <div class="chzn-drop" style="left: -9000px; width: 298.333px; top: 22.3333px;">
//this is html of dropdown

我该如何解决?这也可能是由额外的边界引起的,是吗?

最佳答案

抱歉,我确实很快找到了它)

已添加

 .chzn-container-single .chzn-single {
border: 1px solid rgba(98,141, 40, 0.5);
}

删除

   .chzn-container {
       border: 1px solid rgba(98,141, 40, 0.5);}

关于html - 无法使用 Chosen 插件更改下拉列表的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11609826/

相关文章:

javascript - 尝试用js创建日历表

html - 为什么在下面的示例中,内联 block 元素没有占据整个高度?

php - 尝试使用用户名和密码创建用户登录

html - 每行最多 3 个 div,即使只有 1 或 2 个 div,Flexbox 的宽度也相同

html - 居中响应文本

javascript - 如何设置 Angular 验证以处理模糊和表单提交?

php - 从 POST 获取动态变量

HTML & CSS with bootstrap layout help need

html - 如何将 flex 容器居中但左对齐 flex 元素

javascript - Zend 1.12 + Ajax - 提交表单