Home > Blockchain >  Change text color of 'no file chosen'
Change text color of 'no file chosen'

Time:08-04

It always creates a button where 'Choose file' is written, and beside that 'no file chosen' word is visible until I choose any file. But the text color is always black. Is it possible to change the font-color? I need to make it white.

<input type="file">

CodePudding user response:

Try this out.

input[type="file"]{
    color: transparent;
}

CodePudding user response:

You can do something like this

<label for="inputTag" >
  Select Image
  <input id="inputTag" type="file"  />
</label>

And then style it with CSS like this

.input {
  display: none;
}

.label{
 color: #730404;
 cursor: pointer;
}

With this, whatever you put as the label will be your select output. So you won't have Choose file and no file chosen text. You can change the label color as you wish. You can even make the label a CameraIcon

  • Related