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 trialSiddharth Pandey
7,280 PointsHow do I make my Bootstrap NavBar collapsible?
Code: https://github.com/sid-FBLA/BME-FBLA
Domain: https://sid-fbla.github.io/BME-FBLA/
If you inspect element and make the screen phone-sized you will notice that my NavBar does not collapse into a dropdown. Why is this happening, what should I be doing differently?
NavBar content is written in index.html/lines 21-49
All and any help is appreciated!
1 Answer
Shaun Kelly
35,560 PointsHi Siddharth,
The issue seems to be the height you have set on .navbar-collapse
.navbar-collapse {
height: 80px;
}
Remove the height or set to auto and that should solve your problem
Hope this helps, Shaun
Siddharth Pandey
7,280 PointsSiddharth Pandey
7,280 PointsThanks for helping, Shaun, I tried this and the NavBar still does not collapse, I do know how to make it like this using js, however, I want to limit any unnecessary code and collapse it using bootstrap.