.nav-link button Help For Product Landing Page

I’m almost done my Product Landing page except for this one error that I cannot understand. Tried multiple times, I don’t know what I’m doing wrong?

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

Clicking Home in your nav doesn’t currently do anything, because there isn’t a corresponding #home element in your HTML. The other nav links already have matching ids in your HTML.

2 Likes

Hello there, i’m having the same problem. I pass 15/16 tests, i can’t pass test 5 - "When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page. "

What am I doing wrong?

https://codepen.io/spronks/pen/poRVZPz

@Spronks,
First, you should have created your own topic for this. This topic has been marked as resolved.

Second, 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 entire 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.'
Each .nav-link element should have an href attribute : expected false to equal true
AssertionError: Each .nav-link element should have an href attribute : expected false to equal true

Hint:

In your code no .nav-link element has an href attribute

@ First…
Noted
@Second
Thanks for your time and your feedback, i was able to solve it.

1 Like