Set width of dropdown element in HTML select dropdown options

后端 未结 7 1126
醉话见心
醉话见心 2020-11-27 21:36

I am working on a website that involves automatically populating a select box using a PHP script. This all works fine except the problem is that what I am using to populate

7条回答
  •  情话喂你
    2020-11-27 22:15

    On the server-side:

    1. Define a max length of the string
    2. Clip the string
    3. (optional) append horizontal ellipsis

    Alternative solution: the select element is in your case (only guessing) a single-choice form control and you could use a group of radio buttons instead. These you could then style with better control. If you have a select[@multiple] you could do the same with a group of checkboxes instead as they can both be seen as a multiple-choice form control.

提交回复
热议问题