In my mind this is really a non-issue because (in all current version browsers*) if you click on the combo box, it drops down and all choices are shown - and if any are longer than the width of the combo box, they are shown in their entirety because the drop down is as wide as the longest choice.
*The only exception, sort of, is IE. But its current version (9) does work this way. Unfortunately IE version 8 and less do not and many people are limited by their OS so as that they cannot update to version 9.
However, for them you can use the title attribute, example:
Code:
<option title="Difference between Java and JavaScript and a Whole Lot More">Difference between Java and JavaScript and a Whole Lot More</option>
Or add this script before the closing </body> tag:
Code:
<!--[if lt IE 9]>
<script type="text/javascript">
(function(){
var opts = document.getElementsByTagName('option'), sels = document.getElementsByTagName('select'), i;
function titleit(){
this.title = this.options[this.options.selectedIndex].title;
}
for (i = opts.length - 1; i > -1; --i){
if(!opts[i].title){
opts[i].title = opts[i].text;
}
}
for (i = sels.length - 1; i > -1; --i){
(function(sel){
sel.attachEvent("onmouseover", function(){titleit.call(sel);});
sel.attachEvent("onchange", function(){titleit.call(sel);});
})(sels[i]);
}
})();
</script>
<![endif]-->
Bookmarks