HELP! Product Landing Page - .nav-link error

Hello!
I’m soooo close to completing my landing page but I can’t seem to pass the
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.
I’ve been stuck for hours :frowning:

Error code shows: Each .nav-link element should have an href attribute : expected false to equal true

My Codeine link is: https://codepen.io/kgutierrez92/pen/gOoRqBq

My code so far:

logo
  <ul class="nav-link">
    <li><a href="#Home" class="nav-link">Home</a></li>
    <li><a href="#Menu" class="nav-link">Menu</a></li>
    <li><a href="#Contact-us" class="nav-link">Contact Us</a></li>
   </ul>
</nav>

Any Help is truly appreciated!! :smile:
Thank you in advance
Kenia

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15

Challenge: Build a Product Landing Page

Link to the challenge:

Hello,

I am new to this as well so I will try to do my best to explain it clearly. :slightly_smiling_face:
you should be linking your nav-bar button to appropriate sections of your website.
for example, your nav-bar 'href="#Menu" ’ should be linked to the menu section opening tag with the same id name.


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

 on line 32 <section id="Menu"> 

Thank you for your suggestion! :revolving_hearts:
I made the changes and still can’t pass :tired_face:

Seems to be passing that test now.

The only remaining failing test is the following:
The navbar should always be at the top of the viewport.

You’re almost done!

1 Like

Thank you! I just fixed it :smile:
I ended up removing class=“nav-link” from the UL element and adding it to my Nav element.

its showing all tests passed on my end. Could it be a difference in browsers?

Ah nice catch, well done :clap:

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