How can I set the width of select box options?
<p><a href="https://i.stack.imgur.com/15cVL.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/15cVL.jpg" alt="enter image description here"></a></p>

<p>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 &amp; for those larger options set text-overflow as ellipsis. Any help would be appreciated.</p>

<p>Here is what I tried:</p>

<p>Html</p>

<pre><code>&lt;select&gt;
    &lt;option&gt;Select your University&lt;/option&gt;
    &lt;option&gt;Bangladesh University of Engineering and Technology&lt;/option&gt;
    &lt;option&gt;Mawlana Bhashani Science and Technology University&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>Css</p>

<pre><code>select, option {
    width: 250px;
}

option {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
</code></pre>

<p><strong>Fiddle</strong>: <a href="https://jsfiddle.net/3bsbcqfz/" rel="noreferrer">https://jsfiddle.net/3bsbcqfz/</a></p>