Product landing nav link

heres my code so far:

I just cant get it to User Story #5: When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.
Im missing something.

@bronson454, when a test fails click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The full failing message says

When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.'
The .nav-link with href="findus" is not linked to a corresponding element on the page : expected null to not equal null
AssertionError: The .nav-link with href="findus" is not linked to a corresponding element on the page : expected null to not equal null

Do you understand what the test is looking for and why it’s failing?

To access a section, you need to use the # symbol before the name , which you have omitted.

@Exotic, giving an answer because you know how to interpret the failing message does not help a new user. It’s best to point them to the full failing message (which was done) and then let them ask what they don’t understand.

use an id on the section you want to access i.e
<section id="contact-us"> Contact Us </section>

then to access this use a hash before your value in href using an anchor tag i.e
<a href="#contact-us">Contact </a>

@thexovc, instead of posting the full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

This must be a misunderstanding from your part.
I am well aware of that and I havent provided any direct answer.
The person could have made a typo, which in this case was missing a simple # from 2 of the 3 hrefs. Pointing out typos / careless mistakes to someone isnt the same as providing any direct answer, rather, I find it helpful and productive.

Copy pasting an error and showing it to a beginner who is studying HTML and CSS and NOT Javascript, just makes him more confused. Rather than that , I beleive that it is more helpful to point out where he made the mistake rather than providing any direct answer or references, which I beleive is what I did .
If the user did respond saying they didnt understand the message, in most cases, another user would have just said something similar to what I said before.

As you can see from the post I created before, I said

All I said was what he was missing and how its done.
I havent provided any kind of direct answer .

Hope we’re good on this : )

1 Like

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