Just one more test

Hello! For my landing page, I am only passing 15/16. I cannot figure out, why I am not able to pass the last test. Also, if you have time, please give any suggestions to improve my page?

PS) I do have plans to go over all of my projects and make them mobile friendly. I just plan to do this once I complete all 5 projects, and feel more confident to be able to tinker with the code without making a complete mess. Any suggestions for this as well?

Thank you all for your time and patience! Happy coding :slight_smile:

You are passing only 15/16 tests because your nav-link buttons do not link to their respective sections of the page.
For example:

<button ><a class="nav-link" href="#price"><i class="fa fa-credit-card"></i>
Pricing</a></button>

You are supposed to make all the nav-link elements point to their corresponding sections like the one above. You are applying the class nav-link on the wrong elements. It must be on the a elements.

Do my nav-links have to be buttons? I made a dropdown menu, and I used an unordered list to build it, but it does have links… I tried using the list items but it wouldnt let me :frowning:

Your Nav does not have to be button. It is NOT supposed to be buttons. You can use an unordered list. There are other alternatives that I used like just straight up links

<nav>
  <a href="#">Home</a>
  <a href="#">About</a>
  <a href="#">Contact</a>
</nav>

It can be buttons. Just transfer the nav-link class to the a elements which when clicked takes you to the corresponding section.

Well its not supposed to really be buttons, because you are not supposed to wrap buttons inside an a tag

He actually did the right thing. He didn’t wrap the button inside the a elements but instead wrapped a element inside the button. His usage of a button to wrap a elements is not wrong as per the assignment(Not sure about HTML semantics or best practice because people mostly wrap navigation links inside li). He just needed to apply nav-links class on the a elements because they are the elements linking to the different sections of the page.

1 Like