Wrap long-text in drop-down list?

前端 未结 7 1183
轻奢々
轻奢々 2021-01-19 15:19

I have legibly long text in a drop-down list on my asp.net page. it violates the UI boundary and goes beyond the allocated region of UI.

Is there anyway I can wrap [

7条回答
  •  灰色年华
    2021-01-19 15:51

    Longer answer: yes.

    You can use not default element, but make your own with JavaScript and CSS. Your custom droplist element should contain few divs (or other HTML elements) as droplist items. When you'll set fixed width to droplist's cell, text will wrap inside.

    One example is here (just picked up the 1st link from query in google: "JavaScript dropdown").

提交回复
热议问题