FCC: Product Landing Page does not link to corresponding section

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

Please take a look at my code, I don’t know what is wrong. I already made sure to include the hashtags to link to the corresponding section but it seems there’s still something wrong.

Thank you.

Try giving .nav-link classes to <a> tags instead of <li> tags.

2 Likes

Hi :slight_smile:
As @shimphillip said, you have to give the .nav-link classes to <a> tags, like it’s said here:

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.

You will probably have to review your CSS a bit, like replace .nav-link by nav li, for example.

.nav-link{
...
}
.nav-link a{
...
}
.nav-link a:hover{
...
}

Will no longer work.
Must do something like that:

nav li {
...
}
nav li a{
...
}
nav li a:hover{
...
}
1 Like

Thank you very much. This worked!

1 Like

Thank you! I passed all the tests.