0

I can change the width of an upload field with the size attribute:

<input type="file" size="20">

But CSS's width, which works fine for regular input fields and other forms controls, seems to have no effect here, even on Firefox:

<input type="file" style="width: 20em">

Is there another way to accomplish this?

3
  • did you try adding a semicolon after 20em ? Commented Nov 12, 2009 at 23:22
  • 8
    @flyfishr64: that shouldn't make a diff Commented Nov 12, 2009 at 23:24
  • @Mark, ah the old "shouldn't" versus "doesn't, does it?" debate... =) Commented Nov 12, 2009 at 23:33

1 Answer 1

7

I'm not sure if this will help but this article seems to go quite in-depth into various ways of styling a file-input:

http://www.quirksmode.org/dom/inputfile.html

Sign up to request clarification or add additional context in comments.

1 Comment

@Michael, this is an excellent resource. Not as simple as adding some CSS, but it will do the trick. Thank you for sharing that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.