Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I adjust the width of a DropDown <select> box?

Tags:

html

xhtml

I need to adjust the width of a select HTML box without using css, is there a way? I tried size but then it's adjusting the height, and width does nothing? Is there another way?

like image 681
Elitmiar Avatar asked Sep 11 '09 15:09

Elitmiar


1 Answers

There is no way to do it in pure HTML as per http://www.w3.org/TR/html401/interact/forms.html#h-17.6. You can set it using the style element, though which is kind of without css in that it is inline.

<select style="width: ....
like image 60
stimms Avatar answered Sep 23 '22 21:09

stimms