Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrap long-text in drop-down list?

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 [not trim] it using CSS or javascript ? I must display the entire string, no matter how long it is.

like image 404
this. __curious_geek Avatar asked Mar 01 '23 12:03

this. __curious_geek


2 Answers

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.

like image 173
Pawka Avatar answered Mar 06 '23 12:03

Pawka


Short answer: No.

Longer answer: User a radio group instead of a select menu. You could use the CSS overflow property to add scrolling.

like image 39
Quentin Avatar answered Mar 06 '23 11:03

Quentin