Last active
November 14, 2015 14:28
-
-
Save bulbul84/b1e2812e1adf3b278f43 to your computer and use it in GitHub Desktop.
How to style input type file element
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="fileUpload btn btn-primary"> | |
<span>Upload</span> | |
<input type="file" class="upload" /> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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