Selectize dropdown width independent of input

心不动则不痛 提交于 2019-12-05 03:57:33

The widths of each label are set dynamically through JS. To overwrite that how about doing something like this:

.selectize-dropdown {
    width: 600px !important;
}

Fiddle

When the dropdown should change it's width dynamically to the largest option:

.selectize-dropdown {
  width: auto !important;
}

.selectize-dropdown [data-selectable], .selectize-dropdown .optgroup-header {
   white-space: nowrap;
}

Robin's Answer didn't work for me. However the following did.

.selectize-input {
    min-width: 600px !important;
}
.selectize-control {
  width: 90% !important;
}

This would allow you to have it be responsive.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!