avernet
avernet

Reputation: 31753

How to change the width of an HTML upload field with CSS?

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?

Upvotes: 0

Views: 3733

Answers (1)

Michael
Michael

Reputation: 1706

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

Upvotes: 7

Related Questions