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
Ramgopal Bhat
5,812 Pointsnavbar with fixed position below header
I have header at the top and then a navbar. I need this navbar to be fixed while scrolling pushing away the header
2 Answers
Jonathan Grieve
Treehouse Moderator 91,254 PointsHi Ramgopal Bhat,
We need some code to help us identify and debug your problem for you but I have a hunch you're trying to work with Bootstrap?
For this I believe the class you want is navbar navbar-fixed. So add this class to the element you want to be fixed, which should probably be at the top of your screen.
Hope this helps.
mike cee
7,302 PointsPlace the navbar inside the header,and make the header position:fixed. Then give the header a z-index of like a 1000. Look for the CSS basics module "fixed navigation. Hope this helps