Easily Style File Inputs Using Basic HTML And CSS

Posted By Weston Ganger

One common problem for developers is styling the file input field. Here is one ridiculously simple method that works for IE10+ and all other browsers. Just style the label as you want the input to look.

<code class="language-markup">
<label class="my-button-class" style="background-color: green;" for="my-file-selector">
<input id="my-file-selector" type="file" style="display:none;">
Select a File

Related External Links:

- [Stack Overflow - twitter-bootstrap-form-file-element-upload-button](http://stackoverflow.com/questions/11235206/twitter-bootstrap-form-file-element-upload-button)

Article Topic:Software Development - HTML / CSS

Date:June 14, 2016