2014-05-04 43 views
0

这是我用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> 

回答

1

尝试添加到你的CSS

.customSelectInner{ 
    width:100% !important; 
} 

你可以改变风格这CLASSE太

.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 */ 
} 
+0

谢谢。我试过.customSelectInner,但没有想到使用!重要。似乎现在工作正常。 – AndSmith

+0

@AndSmith在插件中有.css(),它设置宽度。 – jeugen