0

File upload form style for all browsers

enter image description here

I use this JSF code for the form

<h:inputFile id="fileToUpload" value="#{contacts.file}"/>
    <h:commandButton value="Upload" action="#{contacts.upload()}">
        <f:ajax execute="fileToUpload" />
    </h:commandButton>

How I can make the form to look like in one style for all browser?

Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
  • 2
    duplicate of a duplicate... http://stackoverflow.com/questions/3226167/how-to-style-input-file-with-css3-javascript or http://stackoverflow.com/questions/572768/styling-an-input-type-file-button – Kukeltje Mar 15 '16 at 10:48

1 Answers1

0

How the upload looks is dependant on how the browser has been designed to render it.

If you want to have the same look and feel across all browsers, then you would need to write a custom control, using a textbox and a button.

Alternatively, you could look at a third party component that does this for you.

Karl Gjertsen
  • 4,690
  • 8
  • 41
  • 64