Product Landing Page - .nav-link error

Hello everyone,

I am having an issue with the objective of the product landing page. Here is the 5th objective: When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.’

Here is the error message: The .nav-link with href="#about" is not linked to a corresponding element on the page: expected null to not equal null.

Here is the code that I wrote: https://codepen.io/eataisim/pen/yLbpMZE?editors=1100

The only problem is with the first nav-link class which has #about href. The rest is okay even though they are absolutely the same.

Have a nice day/night!

Hi @trialenderror ,

The id and height attributes of img are not properly enclosed in quotes. Once that’s done, this test might pass.

<img id= header-img src= 'https://logos-download.com/wp-content/uploads/2019/11/TOMS_Shoes_Logo.png' width='300px' height='200px > </img>

1 Like

@trialenderror 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 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="#about" is not linked to a corresponding element on the page : expected null to not equal null
AssertionError: The .nav-link with href="#about" is not linked to a corresponding element on the page : expected null to not equal null
1 Like

That was the exact reason why I had the problem. Thanks a lot for seeing and letting me know!! I am curious why it affects the ‘‘nav-bar’’ instead of the ‘‘image’’ :thinking:

Hello Roma, thanks for the warning. I indeed read the whole message but still couldn’t solve the problem. But you are right, I should have shared the entire line of error. Have a nice day.

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