How to fix this - Each .nav-link element should link to a corresponding element on the landing page

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf8">
  <meta name="viewport"content="width=device-width, initial-scale=1.0"?
  <title>Product Landing Page</title>
  <link rel="stylesheet" href="styles.css"/>
</head>
<body>
  <header id="header">
    <nav id="nav-bar">
      <img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png" id="header-img" alt="logo" class="logo">      
        <ul>
          <li><a href="#" class="nav-link">Features</a></li>
          <li><a href="#" class="nav-link">How It Works</a></li>
          <li><a href="#" class="nav-link">Pricing</a></li>
        </ul>
    </nav>
  </header>
  <div id="container">
    <section class="massage-box">
      <h1>Handcrafted, home-made masterpieces</h1>
      <form id="form" action="https://www.freecodecamp.com/email-submit">
        <input id="email" type="email" name="email" placeholder="Enter your email">
        <input id="submit" type="submit" value="GET STARTED" class="btn"></input>
     </section>
    </div>
    </form>
  <section id="features">
    <h2>Premium Materials</h2>
    <p>Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase. </p>
    <h2>Fast Shipping</h2>
    <p>We make sure you recieve your trombone as soon as we have finished making it. We also provide free returns if you are not satisfied. </p>
    <h2>Quality Assurance</h2>
    <p>For every purchase you make, we will ensure there are no damages or faults and we will check and test the pitch of your instrument. </p>
  </section>
  <secion id="how-it-work">
    <iframe id="video" src="https://www.youtube.com/embed/JEwOy5Fm1yw"></iframe>
  </section>
  <section id="pricing">
    <div class="price-box">
      <h3>TENOR TROMBON</h3>
      <h2>$600</h2>
      <p> Lorem ipsum.
          Lorem ipsum.
          Lorem ipsum dolor.
          Lorem ipsum.    
      </p>
      <a href="#" class="btn">SELECT</a>
    </div>
    <div class="price-box">
      <h3>BASS TROMBON</h3>
      <h2>$900</h2>
      <p> Lorem ipsum.
          Lorem ipsum.
          Lorem ipsum dolor.
          Lorem ipsum.    
      </p>
      <a href="#" class="btn">SELECT</a>
      </div>
      <div class="price-box">
        <h3> VALVE TROMBONE</h3>
        <h2>$1200</h2>
        <p>Lorem ipsum.
           Lorem ipsum.
           Lorem ipsum dolor.
           Lorem ipsum.
        </p>
        <a href="#" class="btn">SELECT</a>
      </div>
  </section>
  <footer>
    <div>
      <ul>
        <li>
          <a href="#header" class="nav-link">Privacy</a>
          </li>
        <li>
          <a href="#header" class="nav-link">Terms</a>
          </li>
        <li>
          <a href="#header" class="nav-link">Contact</a>
          </li>
      </ul>
    </div>
    <div>
    <p>&copy;Copyright 2016, Original Trombone</p>
    </div>
  </footer>
</body>
</html>
/* file: styles.css */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: san-serif;
line-height: 1.5;
}
ul {
list-style: none;
}
a {
text-decoration: none;

}
#header {
display: flex;
}
#nav-bar {
position: fixed;
top: 0;
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
background-color: rgb(255, 255, 255);
overflow: hidden;
}
#container {
max-width: 960px;
margin: 2rem auto 0;
overflow: hidden;
}
.logo {
width: 300px;
cursor: pointer;
}
@media (max-width: 1200px) {
body {
  background-color: rgb(255, 255, 255);
}
}
.btn {
display: inline-block;
padding: 0.4rem 1.5rem;
color: #333;
text-transform: uppercase;
font-weight: bold;
background-color: #f1c40f;
}
.nav-link {
float: left;
display: block;
color: #000000;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0

Challenge: Responsive Web Design Projects - Build a Product Landing Page

Link to the challenge:

You forgot to include the id in your link’s href=“#”.

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