Code working but test not valid

Tell us what’s happening:

Good morning. Just like in the title, I’m having trouble in the “Build a Landing Product Page” project. I find myself with buttons that work (i.e. they do what they are supposed to without using anything but HTML, JS and CSS), but the test about the navigation with buttons with the .nav-link class fail. Can I have some help regarding this matter?

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36.

Challenge: Build a Product Landing Page

Link to the challenge:

Welcome to the forum!

What you have is correct, but the tests is looking for basic HTML:
Each .nav-link element should have an href attribute
Something like this from the curriculum.

Your project is more complex than the test which is expecting just basic HTML/CSS :slight_smile:

Hello, thank you for the greeting and the quick answer! :slight_smile:
I tried also wrapping anchor elements in between the buttons and each pointing with href to the id of the div of each section, but that didn’t work either. :sweat_smile:

Did you move the class into the <a> tag as well? Like this:
<button><a class="nav-link" href="#chi-siamo">Chi siamo</a></button>

I did not, and it works. Thank you very much :slight_smile:

1 Like