How to change the color of the Choose File button (wordpress)?

Viewed 919

I need to change the color of the Choose File.
I tried the following code, but it only changes No file chosen.
Would you please let me know how to change the color?

.hide-if-value input {
  color: red!important;
}
<div class="hide-if-value">
  <label class="acf-basic-uploader">
        <input type="file" name="acf[field_60bc599999c5]" id="acf-field_60bc599999c5">
   </label>
</div>

enter image description here

Thank you.

2 Answers

You can make use of ::file-selector-button since the upload button is part of the pseudo-element.

.hide-if-value input[type=file]::file-selector-button {
  color: red;
}
<div class="hide-if-value">
  <label class="acf-basic-uploader">
            <input type="file" name="acf[field_60bc599999c5]" id="acf-field_60bc599999c5">
      </label>
</div>

you can try this code.

input[type=file]::file-selector-button {color: #069e08; }

Related