这是我使用下拉表单的jQuery插件遇到的奇怪问题(插件主页:http://adam.co/lab/jquery/customselect/

由于某些原因,在一些字符之后,选项标题将其自身强制为2行或更多行。我尝试过更改盒子的宽度,但这无法解决任何问题。

这是我的意思的示例:

http://jsfiddle.net/hysHB/999/

<select class="styled">
  <option value="">This should all be on one line</option>
  <option value="one">two</option>
</select>

最佳答案

尝试添加到您的CSS

.customSelectInner{
    width:100% !important;
}


您也可以更改此类的样式

.customSelect {
/* This is the default class that is used */
/* Put whatever custom styles you want here */
}

.customSelect.customSelectHover {
/* Styles for when the select box is hovered */
}

.customSelect.customSelectOpen {
/* Styles for when the select box is open */
}

.customSelect.customSelectFocus {
/* Styles for when the select box is in focus */
}

.customSelectInner {
/* You can style the inner box too */
}

08-25 16:56
查看更多