Help with Landing Page App

Hey there people!
I’m continuing with the projects and I find a little problem when solving the Landing Page with the next:

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.

Currently, I have this in my code:

<nav id='nav-bar'>
    <ul class='nav-list'>
      <li class='nav-link'><a href='#preview'>Preview</a></li>
      <li class='nav-link'><a href='#services'>Services</a></li>
      <li class='nav-link'><a href='#models'>Models</a></li>
      <li class='nav-link'><a href='#contact'>Contact Us</a></li>

After which I have 4 elements, each with the correspongin id=’’ attribute. Still, I get an error.

What could be the problem?
Thanks in advance!

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.

Hint: Which element is clickable?

1 Like

So the problem was that the anchor element was expected to have a class value of nav-link.

Thanks for the help!!

1 Like

Good job @cristian158. I know it feels better that you figured it out rather than having someone just tell you to move the class from the li element to the a element.

1 Like

Thanks man! I appreciate the help instead of the answer.

1 Like