Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

custom checkboxes for cross browser compatibility not all highlighting

I cannot get all of my checkboxes to highlight in the custom checkboxes video only the top one highlights when i click the rest of the checkboxes.

                 <div class="form-check">
                     <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="customCheck1">
                        <label class="custom-control-label" for="customCheck1">JavaScript Frameworks</label>
                      </div>
                  </div>
                  <div class="form-check">
                     <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="customCheck1">
                        <label class="custom-control-label" for="customCheck1">JavaScript Librarys</label>
                     </div>
                  </div>
                  <div class="form-check">
                      <div class="custom-control custom-checkbox">
                        <input type="checkbox" class="custom-control-input" id="customCheck1">
                        <label class="custom-control-label" for="customCheck1">Node.js</label>
                      </div>
                  </div>

1 Answer

One thing I notice is your ids must be unique. You have used id="customCheck1" more than once.

Can you post snapshot of your workspace?

Thanks Kris I just noticed and everything is working now. thank you