[Javascript] Setting the size/width of a select control.

Laurent Muchacho elmuchacho at gmail.com
Fri Oct 14 10:58:29 CDT 2005


Hi Matt,

You can simply change the width of select by changing the width style value

document.getElementById('mySelect').style.width=100 + 'px';

Found more examples in the url below
http://www.expressive-media.co.uk/examples/form/select/size.htm

Regards

Laurent



----- Original Message ----- 
From: "Matt Barton" <javascript at mattbarton.org>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Friday, October 14, 2005 3:46 PM
Subject: [Javascript] Setting the size/width of a select control.


> Hi,
>
> Is there any way to dynamically control the size/width of a <select> 
> control?  It seems to be something so simple, that I'm amazed I can't find 
> anything in my books.
>
> I hope I'm missing something staggeringly obvious ...
>
> Thanks
>
> Matt
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript 




More information about the Javascript mailing list