I want to hide an input
element and trigger it with an associated label
.
Usually that's not a problem. I can simply set display:none
on the input like this
input {
display: none;
}
<input id="upload" type="file" />
<label for="upload">Upload a file</label>
For some reason in Chrome (Firefox works), this technique is not working for a color input - DEMO
input {
display: none;
}
<input id="colorPick" type="color" />
<label for="colorPick">Pick a color</label>
Is this a webkit bug or is there a logical reason as to why this doesn't work?