Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the width of select box

Tags:

html

jquery

css

How to change the width of select box in jquery or in html?

like image 771
jai Avatar asked Dec 02 '22 03:12

jai


2 Answers

In HTML

<select name="foo" style="width:30px;">
    <option>one</option>
    <option>two</option>
    <option>three</option>
</select> 

In Jquery

$('#Id').width(30);
like image 96
PHP Avatar answered Dec 05 '22 00:12

PHP


use css().

$('select').css({'width': 200});
like image 20
Santosh Linkha Avatar answered Dec 05 '22 01:12

Santosh Linkha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!