0

<!DOCTYPE html>
<html>
<body>

<style>
   #myfile:after {
     content:"123"!important;
   }
</style>
  <input type="file" id="myfile" name="myfile"><br><br>
</body>
</html>

I can change the text with css but the text "No file chosen" is not removed.

How can I remove this text? Or how can I add text to the right side of the input in another way.

  • 1
    the answer to this question might help https://stackoverflow.com/questions/572768/styling-an-input-type-file-button The trick is to make the input invisible and use a label linked to the input id. Then you can style/change the text of the label as you wish – user3252327 Sep 26 '22 at 23:11

1 Answers1

0

you can try this in your css file

input[type='file'] {
  color: transparent;
}
aknadif
  • 71
  • 3
  • OP says, ***change the "No file chosen" text***... this removes the color of the text making the text transparent. Perhaps you can also show them ***how*** to replace the text that would then be transparent.... – dale landry Sep 26 '22 at 23:50