How can change width of dropdown list?

前端 未结 7 647
执念已碎
执念已碎 2020-12-04 18:46

I have a listbox and I want to decrease its width.

Here is my code:









CSS:

#wgtmsr{
 width:150px;   
}

If you want to change the width of the option you can do this in your css:

#wgtmsr option{
  width:150px;   
}

Maybe you have a conflict in your css rules that override the width of your select

DEMO

提交回复
热议问题