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
https://codepen.io/roostermurdock/pen/WNbExoJ
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:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
pjonp
December 28, 2019, 10:16am
2
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.
https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/link-to-internal-sections-of-a-page-with-anchor-elements
Your project is more complex than the test which is expecting just basic HTML/CSS
Hello, thank you for the greeting and the quick answer!
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.
pjonp
December 28, 2019, 10:29am
4
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
1 Like