input[type="fi...">

Error loading 4th Firefox 4 file?

3I changes the width of the input HTML tag:

<input type="file" id="newFilename" name="Filename"> input[type="file"] {width:380px !important} 

In Firefox 3, Chrome, and Safari, it works great.

In Firefox 4, I cannot get it to work. The width remains the same!

Demo: http://jsfiddle.net/LwzW9/1/

Validation with Firebug I noticed that the size of the <input> changing, but I do not see the changes: (see image)

enter image description here

Any ideas? Is this a known bug?

Thanks.

+7
source share
2 answers

I had the same problem when using uniform.js, this view solves the problem:

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

or

 $('input[type="file"]').attr('size', 'X'); 

where X is the number of characters you define. You must also have the correct width in CSS for security in other browsers.

Fiddle: http://jsfiddle.net/EfntV/

+13
source

I noticed that you have

 width: 380px !important; //line 94 

This will override the value of #newFilename {width:280px}

Note I'm not 100% sure about how this works, since you use a much more specific CSS selector to change the width. You will need a sample to view

+2
source

All Articles