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

CSS

HanJoon Kim
seal-mask
.a{fill-rule:evenodd;}techdegree
HanJoon Kim
Full Stack JavaScript Techdegree Student 15,388 Points

Custom Checkbox code changed, and it's not working.

This is the bootstrap code for checkbox which is introduced on video.
     <label class="custom-control custom-checkbox">
                  <input type="checkbox" class="custom-control-input">
                  <span class="custom-control-indicator"></span>
                  <span class="custom-control-description">Javascript Frameworks</span>
 </label>

However, what is currently on Bootstrap website is this.
<div class="custom-control custom-checkbox">
  <input type="checkbox" class="custom-control-input" id="customCheck1">
  <label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
</div>

The problem is that the updated code is not working.

2 Answers

Steven Parker
Steven Parker
231,008 Points

I believe the course was released before there was a stable Bootstrap 4 version and uses the "alpha" release. This is obviously one of the changes made between the alpha release and the official stable one.

The website code will work with the stable v4.0.0 or later version, which you can download from getbootstrap.com or use via CDN.

The alpha version is still available from the official website, along with documentation including this page with the custom checkbox. To avoid confusion, I recommend always selecting the alpha version when referring to the official documentation while taking the course.

Richard Eldridge
Richard Eldridge
8,229 Points

I was having problems getting the updated code on Bootstrap's website working even though I was using the most current CDN. I pasted the code from the lesson (supposedly old code from an alpha or beta), and it works just fine even with the new CDN. All I can assume is there is a discrepancy in Bootstrap's docs. Regardless, it works as expected now...