Product Landing Page nav-link error?

Product Landing Page nav-link error?
0

#1

My page gets this error

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

The .nav-link with href="#home" is not linked to a corresponding element on the page "

but they are and they are working. So what is wrong? Is it a bug?

Checked it with Chrome, Safari and Firefox.

Here’s the page Product Landing Page
And here’s the code Product Landing Page code


#2

Looks like you’re missing a div with the id home.


#3

No, that’s what makes it so weird. It’s there as well as the other id’s.


#4

You have a link that points to #home, that’s right. But you don’t have a div with the id home.


#5

Have you checked the code? It is there. How would the link have worked otherwise?

Oh wait, I see it now. My anchors have names instead of id’s.


#6

I’ve made a pull request, check if it fix your code. It works because when you have an internal link that points to something invalid it goes to the top. Coincidently, it is exactly where you want it to go. :smiley:


#7

Hahaha, the links refer to the anchor names. It works, but it’s not what is asked for. They want ID’s (way too many id’s :stuck_out_tongue_closed_eyes:)

And thanks! :+1:t2:


#8

Yes, internal links searches for id’s. So, the tests passed now?


#9

Yes, it does. But they also search for name-tags.


#10

I don’t think they search for name, only for ids. Anyway, glad the tests are passing now.


#11

I proved it also search for anchor names, the links worked when they were named. Didn’t you try them all?

Anyway, glad you got me on the right track. Thanks again. :blush:


#12

Ok so I did some tests and it does work when you use <a name="something"></a>, but it does not work if you put the attribute name anywhere else.

It works only with chrome, firefox did not work. Not sure about other browsers too.

Anyway, how you discover that? :smiley: Don’t use this way, put the id attribute, it’s the correct and supported way .


#13

I tested it in Firefox, chrome and safari om my Mac, they all worked.
Dunno, I just tried it, I guess. Won’t do that anymore, promise. :grinning: