2 ms·
The `for` attribute (`htmlFor` in jsx) will also allow the same kind of behavior: <label for="coolInput">Click me:</label> <input type="checkbox" id="c
by adregan 10y ago
The `for` attribute (`htmlFor` in jsx) will also allow the same kind of behavior:
<label for="coolInput">Click me:</label>
<input type="checkbox" id="coolInput" />
Edit: You edited while I was typing this out and added info about the `for` ;)
- cptskippy 10y agoThis certainly works but margins are still a dead-zone around inputs. Nesting the inputs can give you larger touch targets which is often preferable. http://codepen.io/anon/pen/qNzOYW http://codepen.io/anon/pen/qNzOYW