html - set width to dropdown and adjust text within size as per width -


.option100{     width:100px !important; }   <select id="fieldofinterestselect" name="fieldofinterest" class="form-control" required=""><option value="-1">select one</option><option value="4893" class="option100">actual(r)rrrrrrrrrrrrrrrr</option><option value="4891" class="option100">customerrrrrrrrrrrrrr</option><option value="4892" class="option100">daterrrrrrr</option><option value="4894" class="option100">forecast(r)rrrrrr</option></select> 

even though have fixed size of option , not applied. if text large option box expanded length of text.

finally, got solution trying in various ways. best way trim text , ad full text on 'title'. [2] solution works, use ul li structure. have implemented , works fine me. solves problem of classes getting overriden default class.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -