0

I have used some css to change the background colour of the browse button for
<input type="file">

You can see it here: JSfiddle

The problem I am having is that it does work for chrome (it will show as a black button with white text)

But it will not change the background colour for IE?

I am at a loss with what to do with this to make it work

HTML:

<input type="file">

CSS:

input[type=file] {
border:none !important;
background-color:#F3282B;
background-image:none;
}

input[type=file]::-webkit-file-upload-button {
border: none;
margin: 0;
padding: 0;
-webkit-appearance: button;
width: 100px;
background:#000 !important;
color:#fff;
}
Howli
  • 12,291
  • 19
  • 47
  • 72
Suzi Larsen
  • 1,420
  • 5
  • 18
  • 32
  • IE doesn't support that directly (using CSS only). You can try a workaround like the one explained here: http://stackoverflow.com/questions/12578749/how-change-text-and-color-of-button-browse-of-input-file – Aziz Mar 20 '14 at 17:19

1 Answers1

0

You cannot. However, you can hide it and trigger it via js.

Rick
  • 508
  • 4
  • 9