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 trialScott LaPlant
356 Points1st official post to the forum (hello everyone). I have the following code I can't seem to get to work (see below).
<div class="dropdown open pull-right"> <h6 class="dropdown-header">Sort by <i class="fa fa-angle-down"></i></h6> <div class="dropdown-menu" aria-labelledby="dropdownMenu1"> <a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something else here</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#">Separated link</a> </div> </div>
My question is: shouldn't linking to the bootstrap js file be enough? Keep in mind I'm using bootstrap alpha 4 (nothing like being on the bleeding edge). Can anyone see anything obvious?
4 Answers
Shawn Denham
Python Development Techdegree Student 17,801 PointsYou need to link the css file :)
amadeo brands
15,375 PointsYou should link to the CSS file with the following code ... as you can see I use a CDN. This is the best way to link to your Bootstrap CSS :) All the best m8 press on!
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
Scott LaPlant
356 PointsHi amadeo,
Which CDN do you use? Recommendations? Just getting the swing :) Thanks for the tip!
amadeo brands
15,375 PointsSee more via this link: Bootstrap CDN
Scott LaPlant
356 PointsThanks Amadeo! I've uploaded the code I'm using - I've not used the cdn links as of yet as I'm trying to pick up sass and see how things all work together - I do plan in the future though :)
You can view all the code here This is the example layout Let me know if you want access to the github repo to take a look at how I have things linked. I simply think I don't have the js files setup correctly - it's almost like the site doesn't know the js files are there. Setting the sass file paths might be where I went awry, not sure. Help! :) I'm trying
Scott LaPlant
356 PointsScott LaPlant
356 PointsSorry - you can view the file here: bootstrapv-4.css