Build a Product Landing Page - User Story #5

Stuck on this question: 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.

Action taken:

  • tried writing it from scratch > didn’t pass
  • looked at a few other examples (I think I matched what other have done) > didn’t pass

My understanding:

  • I have the general idea down > linking two pieces together
  • Think my error is in some slight detail being overlooked.

My Code:

Read the rest of that error message:

“The .nav-link with href=”#How-Can-It-Help" is not linked to a corresponding element on the page "

Do you have an element with the id of “How-Can-It-Help”? I’m not seeing it. I think you need to add it. Same for the “About Us” link too.

Also, ids need to be unique on the page. So you can’t have multiple a tags with id “Home-Automation”.

1 Like

Ah got it. I was trying to see if it worked with the first element only. Added the next two and made them unique and it passed. Thanks for the guidance.