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

Navbar menu not dropping when on mobile device? VERY important tip for this part of the Bootstrap navbar course.

On my own website I was using the syntax Guil provides in the Bootstrap navbar portion of the course to get a drop-down menu when in mobile however it would not work. I tried using all of his code from the final project files and it still wouldn't work even though his worked when he demonstrated it during the course. After a couple hours of searching, I uncovered posts here on Treehouse that tried to answer this question but to no avail.

I eventually found an article on Stack Overflow and believe it or not, it was because 2 files were missing from the head section of the html file - importing JavaScript.

Also, under the div "container" you should include a class such as <div class="navbar-header"> even though that's also not shown in the course, here is the documentation: http://getbootstrap.com/components/#navbar-default

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

<!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

I followed the instructions as directed from the Bootstrap documentation and until I put these in my html, the menu wouldn't work.

I hope this helps someone else from lots of frustration!