The W3C validator says: “Attribute size not allowed on element input at this point.”
<input type="file" name="foo" size="40" />
What is the correct way to specify the width of a file input in HTML5?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the input field use the style attribute, this allow you to use css.
<input type="file" name="foo" style="width: 40px" />Or with separate css: