Is there a way to limit the text length in dropdown list options using HTML and CSS? I've tried the following code snippet, which works fine in Firefox but doesn't seem to work in Google Chrome and Opera browsers.
<div class="select">
<select name="option[1381]" id="input-option1381" class="form-control ">
<option value=""> --- Please Select --- </option>
<option value="5051" data-engraving="Checkered Clipboard Clip"> Checkered Clipboard Clip (+$1.50)</option>
<option value="5050" data-engraving="Blackout Clipboard Clip"> Blackout Clipboard Clip (+$1.50)</option>
</select>
</div>
<style type="text/css">
.select select {
overflow: hidden;
position: relative;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
I'm puzzled by why it's not working in Opera and Chrome. Can anyone offer some insight into this issue?