0

:EDIT: I have it figured out. Thanks!

I have a standard <button> checkbox in a <form> that I'd like the user to be able to select even if they miss the box by a few pixels.

I'm nowhere near good enough with JS to know how to do this.

Been scouring for a half hour now, don't know what to type to get the results I want.

Nick
  • 23
  • 4
  • This is perfect, if I can put the checkbox inside the CSS block. https://stackoverflow.com/questions/72770859/how-to-check-uncheck-checkbox-by-clicking-outside-specific-block – Nick Feb 27 '23 at 22:35

1 Answers1

0

You could just associate the input element with a label and give that a bit of padding.

This snippet puts the input as a child of the label.

label {
  padding: 10px;
}
<label><input type="checkbox"></label>
A Haworth
  • 30,908
  • 4
  • 11
  • 14