How to adjust the width of a HTML combobox (Drop down box or Select box)

No Comments
  • You can use external CSS (Cascading Style Sheets) or Inline StylesNOTE: External CSS stylesheets are best to use.
  • Example using inline styles.
    <select style="width:200px;">
        <option>Option 1</option>
        <option>Option 2</option>
        <option>Option 3</option>
    </select>
  • Example using external CSS

    HTML

    <select class="dropdown">
        <option>Option 1</option>
        <option>Option 2</option>
        <option>Option 3</option>
    </select>

    CSS

    .dropdown{
        width: 200px;
    }

Image Credits: Photo by Isis França on Unsplash.

Last Updated On March 22, 2018

Related Articles

No results found

Leave a Reply

avatar
  Subscribe  
Notify of
Menu
Copy link