I’ve been editing my Landing Page certification project and I seem to run into this issue prompt:
Each .nav-link element should link to a corresponding element on the landing page
I’m genuinely confused as I’d already included the links and corresponding
hrefs to link to the corresponding elements, however, the issue seems to be persistent!
So in order to check whether or not the issue is actually with my code, I went ahead and tested it using FCC’s Test Suite on Codepen, turns out my code passed all 16 tests.
Below is the link to my pen, I’d be more than glad to get someone’s assistance on the issue, I’m also open to receive constructive criticism as it would help me lots!
Thanks in advance.
HI @JohnDoe1 !
Welcome to the forum!
Your issue is here
<li><a href="#" class="nav-link">Privacy</a></li>
<li><a href="#" class="nav-link">Terms</a></li>
<li><a href="#" class="nav-link">Contact</a></li>
You are using the class nav-link here which is confusing the test because it is expecting that link to navigate to a corresponding section on the page.
I would suggest just deleting those classes or renaming them because nav-link doesn’t make much sense since it is in the footer.
footer-link would make more sense.
Hope that helps!
Thank you so much for your reply!
I was so confused that I overlooked the fact that I gave both the navbar links and the footer links the same class, now that I’ve fixed that my code seems to go through!
Thank you again for your help!