Skip to content

Instantly share code, notes, and snippets.

@scottb
Created March 6, 2015 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottb/43d5c67e2b90d5e918ba to your computer and use it in GitHub Desktop.
Save scottb/43d5c67e2b90d5e918ba to your computer and use it in GitHub Desktop.
Bootstrap3-styled file upload buttons
.btn-file {
position: relative;
overflow: hidden;
& input[type=file] {
position: absolute;
top: 0;
min-width: 100%;
max-width: 100%;
min-height: 100%;
font-size: 100%;
text-align: right;
filter: alpha(opacity=0);
opacity: 0;
outline: none;
background: white;
cursor: inherit;
display: block;
}
&+.btn-file-filename {
margin-left: 10px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment