开发者

How to change the width of list box in html?

开发者 https://www.devze.com 2023-02-13 08:55 出处:网络
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\">

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

0

精彩评论

暂无评论...
验证码 换一张
取 消