简体   繁体   English

Select2输入组固定宽度

[英]Select2 input-group fixed width

input group select 2 element is disrespecting parent element width by going wider what it should ! 输入组select 2元素通过扩大其应有的范围而忽略了父元素的宽度!

selecting a normal option looks fine 选择普通选项看起来不错

选择普通选项看起来不错 when i select a longer option it will look like this 当我选择更长的选项时,它将看起来像这样

当我选择更长的选项时,它将看起来像这样 how can i have a fixed width for the "Select 2" container even if long text chosen? 即使选择了长文本,我如何对“选择2”容器具有固定的宽度?

如果我理解正确,您希望第二个选择器比第一个选择器短

<select name="select2" style="width:100px; display:block;">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM