Skip to content

Instantly share code, notes, and snippets.

@yevmoroz
Last active August 29, 2015 14:06
Show Gist options
  • Save yevmoroz/26da0b4faf4e8adaa42c to your computer and use it in GitHub Desktop.
Save yevmoroz/26da0b4faf4e8adaa42c to your computer and use it in GitHub Desktop.
<input type="file" /> styling, better way, html valid
Better way to hide you **<input type="file" />** is to wrap it into <label> tag.
So it will look like so
<label class="file-chose">
<input type="file" />
</label>
After that you have to make css it styled to set input's display property to "none":
.file-chose input[type="file"] {
display:none
}
And finally style the .file-shose class you like/want
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment