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

Hi, so I’m trying to finish my product landing page and have been really struggling with number 5. I was wondering if anyone could help me out. Thanks! Here is the link to my code. pen:
Product Landing Page (codepen.io)

Hello,
typically you need to remove the default markers. You do this by

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

And you need to remove the default text-decoration of the a tag. for this you can use:

 a { color:#ffffff;
  text-decoration: none;
  text-transform: uppercase;}

and you need to adjust the place of items:

ul{
  margin: 0;
  padding: 0;
}

li{
  float:left;
  display: inline;
  padding: 0 20px 0 20px;
}

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

Your nav element is not closed, plus you have 2 id’s with the same value which is a no no.

You also have lots of other questionable HTML code like:
<div id="#Features"</div>
which is also not closed properly. I don’t mean to be harsh because I know you are learning but go back through your HTML and look at it more closely, there are many things wrong even though the tests pass.

The tests use codepen, but if you use a code editor like VS Code or Sublime (plus linters optionally) they will catch and identify the errors in your code that codepen does not.

I like VS Code but that’s a personal opinion. I don’t code anything in codepen anymore. If I need to have or post code there I code it in VS Code and copy paste to codepen.

When I was in a learning stage similar to yours I read this advice and didn’t believe it, until I got off codepen and realized how much better coding was in an editor. But anyway it can help you with errors in your code and fcc doesn’t teach using a code editor.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.