15/16 Tests Passed on Product Landing Page

I’ve finished all the tests for the product landing page except for #5.

(When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.’)

This test won’t pass despite the fact that the page jumps in my link bar appear to be working perfectly. Can anyone help? I’ve been stuck on this part for a looooong time now. :confused:

Here is the link to my pen: https://codepen.io/camchardukian/pen/aQMmdz

Any help is greatly appreciated! :grinning:

the problem is:
“The .nav-link with href=”#demo" is not linked to a corresponding element on the page : expected null to not equal null"

you have:

<li><a class="nav-link" href="#demo" >Demo</a></li>

and

<section id="Demo">

be aware of case sensitivity

1 Like

You are right Sorinr. But why isn’t it working? I have code for that in the nav…

 <li><a class="nav-link" href="#demo">Demo</a></li>

and further down…

<h2> <a name="demo">Some Examples...</a></h2>

Ahhh it must have been confused from that section ID. I thought it would just go to the part with a name by default. Thank you very much for your clarification! :sweat_smile::laughing:

Nope the pair is href->id

1 Like