Skip to content

Instantly share code, notes, and snippets.

@bulbul84
Last active November 14, 2015 14:28
Show Gist options
  • Save bulbul84/b1e2812e1adf3b278f43 to your computer and use it in GitHub Desktop.
Save bulbul84/b1e2812e1adf3b278f43 to your computer and use it in GitHub Desktop.
How to style input type file element
<div class="fileUpload btn btn-primary">
<span>Upload</span>
<input type="file" class="upload" />
</div>
.fileUpload {
background: #ff4001 none repeat scroll 0 0;
border-radius: 0;
font-weight: 700;
margin: 0;
overflow: hidden;
position: relative;
width: 90px;
}
.fileUpload input.upload {
position: absolute;
top: 0;
right: 0;
margin: 0;
padding: 0;
font-size: 20px;
cursor: pointer;
opacity: 0;
filter: alpha(opacity=0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment