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 Bootstrap Basics Building Forms With Bootstrap Adding a Select Menu

Checkboxes bug :/

Hi there !

Today bootstraps provides a code for "custom styled checkboxes" different from the one used in the video

you can find it here : https://getbootstrap.com/docs/4.0/components/forms/#checkboxes-and-radios-1 , but i wrote it just below:

<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>

when i copy/paste it, it seems it doesn't display the checkbox anymore, only the text. Can someone explain me why?

2 Answers

Heidi Puk Hermann
Heidi Puk Hermann
33,366 Points

Hi,

it is because the workspace uses the beta-version of bootstrap 4 as default.

if you change your css-file in the header to :

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

the "new" way of making custom checkboxes works fine.

Steven Parker
Steven Parker
229,644 Points

The videos were created before the official release, I think they use the "alpha" release. This is probably one of the changes made in creating the release version of Bootstrap 4.

I'd bet a 3rd revision of this course is already in the works.

i hope so, coz here i really don't understand why the checkbox is hidden and why its position is so random :/