Custom Upload Button

Although some of these answers will create something that looks like you want it to work, they will break down when they try to perform the way that you expect. The file input doesn’t style well directly and you will have trouble trying it. However, there is a trick.

The trick is to turn the opacity of the input to 0 and then change the background underneath it to the button style that you want.

.file_button_container,
.file_button_container input {
     height: 47px;
     width: 263px;
 }

 .file_button_container {
     background: transparent url(http://i.stack.imgur.com/BT5AB.png) left top no-repeat;
 }

 .file_button_container input {
     opacity: 0;
 }
<div class="file_button_container"><input type="file" /></div>

Leave a Comment