Skip to content

Instantly share code, notes, and snippets.

@shelling
Created October 30, 2012 14:59
Show Gist options
  • Select an option

  • Save shelling/3980711 to your computer and use it in GitHub Desktop.

Select an option

Save shelling/3980711 to your computer and use it in GitHub Desktop.
hidden file input
---
layout: false
---
!!! 5
%html
%head
%link{href: "//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.0/css/bootstrap-combined.min.css", rel: "stylesheet"}
%body
.container
.btn.btn-primary.input-wrapper
%i.icon-plus
%span= "select file"
%input{type: "file", name: "files[]"}
:css
body {
padding-top: 60px;
}
.input-wrapper {
position: relative;
overflow: hidden;
cursor: pointer;
display: inline-block;
}
.input-wrapper input {
position: absolute;
right: 0;
top: 0;
opacity: 0;
cursor: pointer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment