When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.’
Could someone explain to me what should I add/ modify? This is my code https://codepen.io/larisacostea1997/pen/eYeGpzw
Could someone explain to me what should I add/ modify? This is my code https://codepen.io/larisacostea1997/pen/eYeGpzw
You have some nav links set up:
<ul>
<li><a href#="Menu" class="nav-link"> Menu </a></li>
<li><a href#="Home" class="nav-link"> Home </a></li>
<li><a href#="About us" class="nav-link"> About us </a></li>
You have a few issues here. For one thing, the “#” goes inside the href, not in the attribute name. It should be something like href="#my-link"
. That will link to something that has the id “my-link”. The other problem is that you cannot have spaces in the link, like you have with “About us”. Another problem is that you need a place for these to link, sections with those ids.
You may want to review this lesson.
Thank you. I noted that. However my question is about this task: " When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page."
OK, then I don’t understand your question. Please start from scratch and ask your question again.
Being able to formulate questions and ask them clearly is an important skill for a dev. I’ve had to do it at work twice today already.
This is the task " When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page." How do I do that?
Please reread what I wrote. I was answering that question. If you do not understand what I’ve written, please point out where I clarify.
I managed to resolve it. Thanks
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.