I would do so using bootstrap
Part 1. HTML
<div class="fileUpload btn btn-primary">
<span>Upload</span>
<input type="file" class="upload" />
</div>
Part 2. CSS
.fileUpload {
position: relative;
overflow: hidden;
margin: 10px;
}
.fileUpload input.upload {
position: absolute;
top: 0;
right: 0;
margin: 0;
padding: 0;
font-size: 20px;
cursor: pointer;
opacity: 0;
filter: alpha(opacity=0);
}
Without botstrap you can do this:
/* CSS */
input[type="file"] {
display: none;
}
<!-- HTML -->
<label class="custom-file-upload">
<input type="file"/>
Clique aqui para upload
</label>