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 4 Basics (Retired) Using Bootstrap Components Building a Navbar

Isabel Rosemblatt
Isabel Rosemblatt
7,800 Points

Navbar hides the headings of each section

Hi, in the video it says it will adress the issue of the fixed navbar hidding the page content in the next video, but it never does. I did the entire course and up to the end if you click on any item of the nav bar it takes you to the section of the page but it hides the headings of each section. How can I fix that? I tried adding padding or margin to the bottom of the navbar, but it doesn't work.

Thank you.

3 Answers

Taylor Shuff
Taylor Shuff
13,002 Points

an easy fix may be just to add padding-top to each individual section of the page; although, this could potentially look a little weird when scrolling(if you add too much padding).

Isabel Rosemblatt
Isabel Rosemblatt
7,800 Points

Thank you, the padding works fine since the nav bar is not to big. The code I was using was the same one from the project file.

Hi! I found that just adding padding didn't work well, so I added margin to both top and bottom and it looks lovely! Thanks :)