How to change the width of the list box in html?

How to change the width of the list box

<select id ="tagsList" class="ui-widget-content ui-corner-all" width="100" size="18" multiple="multiple">  

I try width="100", but it does not work

+3
source share
4 answers

You can set the width using inline css as follows:

<select style="width: 100px;"></select>

In with the rest of your attributes.

There are other ways to specify the width of an element, and most of them revolve around CSS. Here's a link to CSS CSS video tutorials that should get you more than primed and ready to go.

+10
source

You need to use CSS:

<select id="tagsList" style="width:100px;">
+4
source

You must use the CSS width property. Addstyle="width: 100px;"

+2
source
<select id ="tagsList" class="ui-widget-content ui-corner-all" style="width:100;" size="18" multiple="multiple">

this code is almost yours, I just added that this style is enough

+1
source

Source: https://habr.com/ru/post/1794451/


All Articles