Search code examples
htmlfileinputdefault-value

Change default text in input type="file"?


I want to change default text on button that is "Choose File" when we use input="file".

enter image description here

How can I do this? Also as you can see in image button is on left side of text. How can I put it on right side of text?


Solution

  • Each browser has it's own rendition of the control and as such you can't change either the text or the orientation of the control.

    There are some "kind of" hacks you may want to try if you want an / solution rather than a Flash or solution.

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

    http://www.shauninman.com/archive/2007/09/10/styling_file_inputs_with_css_and_the_dom

    Personally, because most users stick to their browser of choice, and therefore are probably used to seeing the control in the default rendition, they'd probably get confused if they saw something different (depending on the types of users you're dealing with).