Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2010
    Posts
    420
    Thanks
    18
    Thanked 2 Times in 2 Posts

    clickable label next to checkbox?

    Hopefully this is a simple one... I just want the text label next to a checkbox to be clickable as well as the box, but I'm not quite sure how to do that.

    Code:
    <input type="checkbox" name="filter1" value="names"/><label for="names">Name</label>

  2. #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    10,017
    Thanks
    6
    Thanked 1,181 Times in 1,152 Posts
    Two options:
    Code:
    <input type="checkbox" name="filter1" value="names" id="whatever" /><label for="whatever">Name</label>
    or
    Code:
    <label><input type="checkbox" name="filter1" value="names" /> Name</label>


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •