Click here to Skip to main content
15,885,048 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to split large length of item text of dropdown list into paragraph in html.


HTML
<select id="s7"  name="size">
   option value="1">My problem is that the column is not wide enough to display the contents in the drop-down list.</option>
   option value="2">bxcvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv</option>
   option value="3">Square Pop-Up </option>
   option value="4">Vertical Rectangle </option>

</select>
Posted
Updated 25-Jun-13 23:23pm
v4
Comments
Thanks7872 26-Jun-13 1:40am    
It means paragraph in dropdown list? Oh my god...the worst logic i have ever came across? Dont you think lil bit on what you want?
Shubhashish_Mandal 26-Jun-13 4:08am    
I dont have any idea, but this link may help you
http://forums.asp.net/t/1390436.aspx/1

CSS
For IE 8 there is a simple css-based solution:

select:focus {
    width: auto;
    position: relative;
}


OR

CSS
select {
    width: 150px; /* Or whatever width you want. */
}
select.expand {
    width: auto;
}


All you need to do is to add the class wide to the dropdown element(s) in question.

HTML
<select class="wide">
    ...
</select>
 
Share this answer
 
v2
I have tried all these but not getting the solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900