Confusion on nav bar errors

My nav bar is working but i’m not passing all the tests. I have 5 links that go to 5 main sections. Everything matches from what i can see. this is the first error: There should be one .nav-link for every element with the class of “main-section”, and every .nav-link should be within #navbar : expected 6 to equal 5. I don’t know why it thinks there’s 6 main sections when there are only 5. The second error is: Every .nav-link does not have an href attribute.: expected 5 to equal 7. every nav-link has the attribute and again there’s only 5. Why is it expected to equal 7?

https://codepen.io/Rachel-Farley92/pen/gOmMZVY

You’ve got a few other elements with class="nav-link". If you want pass the tests, only the links in the nav menu should have this class.

I see my mistake now. I shouldn’t give the nav element the class or the header because everything is within the nav link and so that’s how the navigation communicates with the links themselves. Fixed!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.