How to change the width of list box in html?
How to change the width of list box
<select id ="tagsList" class="ui-widget-content ui-corner-all" width="100" size="18" mul开发者_JAVA百科tiple="multiple">
I try width="100"
but it doesn't work
You can set the width using inline css like this:
<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 revolve around CSS. Here's a link to Google's CSS education video that should get you more than primed and ready to go.
You need to use CSS:
<select id="tagsList" style="width:100px;">
You have to use CSS's width property. Add style="width: 100px;"
<select id ="tagsList" class="ui-widget-content ui-corner-all" style="width:100;" size="18" multiple="multiple">
this code almost your i just added that style that is enough
精彩评论