tags:

views:

234

answers:

3

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?

+3  A: 

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: ....
stimms
Why the downvote? This is a valid answer to the question.
Mayo
+1  A: 

Add an empty option with enough spaces in it ...

jao
This could work if I needed an empty space, thx for the suggestion
Roland
A: 
<style type="text/css">     
    select {
        width:200px;
    }
</style>

Does that not work?

inkedmn
Looks like I need to stick with inline styles or css
Roland