In the picture, the width of option is larger than the select box. I want to set width of those options as same as select box & for those larger options set tex
Another simple jquery solution is to rewrite the option's length manually to get the wanted size as follow :
$('option').each(function() { var optionText = this.text; var newOption = optionText.substring(0, 36); $(this).text(newOption + '...'); });
Select your University Bangladesh University of Engineering and Technology Mawlana Bhashani Science and Technology University