I have asp dropdownlist and I wants to remove remaining horizontal blank space(after red line as in the attached image) after its largest content. Is it possible?
Asked
Active
Viewed 444 times
0
user1301587
- 455
- 4
- 11
- 23
-
Decrease the width of your dropdown. – Arun Feb 13 '14 at 08:55
-
But decreasing the width might cut off the text of other items in the dropdown. Unless the longest text size is known. – Dumisani Feb 13 '14 at 08:56
-
I can not set width as the content could be of any length. – user1301587 Feb 13 '14 at 08:57
-
1I think that is a scrollbar - http://stackoverflow.com/questions/4531269/hide-vertical-scrollbar-in-select-element – JunM Feb 13 '14 at 08:58
-
Is it possible without scrollbar? – user1301587 Feb 13 '14 at 09:00
1 Answers
0
I don't think its possible.
A possible workaround is to use a javascript-based alternative:
http://ivaynberg.github.io/select2/
Select2 looks and functions better anyway and impresses clients :-)
orourkedd
- 6,201
- 5
- 43
- 66