Product Landing Page - Build a Product Landing Page

Can somebody help me with this 1 step i am missing.
Each .nav-link element should link to a corresponding element on the landing page (has an href with a value of another element’s id. e.g. #footer ).

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="./styles.css">
</head>
<body>
   <header id='header'>
      <img id='header-img' src=''></img>
</head>
  <div id='page-wrapper'>
    </div>
    <nav id='nav-bar'>
      <ul>
      <li>
        <a class='nav-link' href='#Bio'>Bio</a>
      </li>
      <li>
        <a class='nav-link' href='#What to know'>What to know</a>
      </li>
      <li>
        <a class='nav-link' href='#Pricing'>Pricing</a>
      </li>
      </ul>
      </nav>
       </header>
       <section id='hero'>
         <h2>The best football coaching service</h2>
         <form id='form' action='https://www.freecodecamp.com/email-submit'>
         <input name='email' id='email' type='email' placeholder='Enter your email address' required>
         <input id='submit' type='submit' value='Get started' class='btn'>
         </form>
         </section>
         <div class='container'>
         <section id='features'>
           <div class='grid'>
             <div class='icon'>
               <i class="fa fa-book">
               </i>
               </div>
               <div class='desc'>
                 <h2>Learn from experienced coaches</h2>
                 <p>Our coaches have years of experience working with kids of all ages and providing insightful training</p>
                 </div>
                 </div>
           <div class='grid'>
                 <div class='icon'>
              <i class="fa fa-soccer-ball-o"></i>
               </div>
               <div>
                 </div>
               <div class='desc'>
                 <h2>Brush up on your football technique</h2>
                 <p>It is essential that kids learn the basics and that is what we focus on as they have all the fundamentals in place</p>
                 </div>
                 </div>
 <div class='grid'>
                 <div class='icon'>
              <i class="fa fa-volume-control-phone"></i>
               </div>
               <div class='desc'>
                 <h2>Quality support and service</h2>
                 <p>We will provide our exper service after sessions through regular reports and updates through our progress chart</p>
                 </div>
                 </div>
           </section>
           <section id='training example'>
             <iframe id='video' height='315' src='https://www.youtube.com/watch?v=H5SMtN6Qa6w&pp=ygURZm9vdGJhbGwgdHJhaW5pbmc%3D' frameborder='0' allowfullscreen>
             </iframe>
             </section>
             <section id='pricing'>
               <div class='product' id='1 session'></div>
               <h2>1 session</h2>
               <ol>
                 </ol>
                 <li>£30 per hour</li>
                 <li>basic training</li>
                 <li>ballwork</li>
                 <button class='btn'>Select</button>
                 <div class='product' id='4 sessions'></div>
               <h2>4 sessions</h2>
               <ol>
                 </ol>
                 <li>£25 per hour</li>
                 <li>basic training</li>
                 <li>ballwork</li>
                 <li>Notes sent at the end of session</li>
                 <li>Phone call discussions</li>
                 <button class='btn'>Select</button>
                 <div class='product' id='10 sessions'></div>
               <h2>10 sessions</h2>
               <ol>
                 </ol>
                 <li>£25 per hour</li>
                 <li>basic training</li>
                 <li>ballwork</li>
                 <li>Notes sent at the end of session</li>
                 <li>Phone call discussions</li>
                 <li>Fitness work
                   </li>
                   <li>
                     Nutrition Guide
                   </li>
                 <button class='btn'>Select</button>
               </section>
                <footer>
          <ul>
            <li><a href="#footer">Privacy</a></li>
            <li><a href="#footer">Terms</a></li>
            <li><a href="#footer">Contact</a></li>
          </ul>
          <span>Copyright Football Coaching</span>
        </footer>
      </div>
    </div>
</body>
</html>

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Product Landing Page - Build a Product Landing Page

I don’t see an element with the id of Bio, so this link is not going to work.

Well, ids can’t have spaces in them, so this one can’t be right.

I don’t see an element with the id of Pricing, so this link isn’t going to work. I do see an element with the id of pricing, so I’m guessing this is what you wanted to point to.

1 Like

thanks that worked, i just want to fix the navigation as it isn’t fixed when scrolling down. I have added code for it but i might be missing something.

can you help me with my navigation

Whenever you want help, you will need to paste your updated code in here so we can see what you have done and test it for ourselves. Please use the following method to paste your code in here. Be sure to paste both your HTML and CSS.

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="./styles.css">
</head>
<body>
   <header id='header'>
      <img id='header-img' src=''></img>
</head>
  <div id='page-wrapper'>
    </div>
    <nav id='nav-bar'>
      <ul>
      <li>
        <a class='nav-link' id='Bio' href='#Bio'>Bio</a>
      </li>
      <li>
        <a class='nav-link' id='What-to-know' href='#What-to-know'>What to know</a>
      </li>
      <li>
        <a class='nav-link' id='Pricing' href='#Pricing'>Pricing</a>
      </li>
      </ul>
      </nav>
       </header>
       <section id='hero'>
         <h2>The best football coaching service</h2>
         <form id='form' action='https://www.freecodecamp.com/email-submit'>
         <input name='email' id='email' type='email' placeholder='Enter your email address' required>
         <input id='submit' type='submit' value='Get started' class='btn'>
         </form>
         </section>
         <div class='container'>
         <section id='features'>
           <div class='grid'>
             <div class='icon'>
               <i class="fa fa-book">
               </i>
               </div>
               <div class='desc'>
                 <h2>Learn from experienced coaches</h2>
                 <p>Our coaches have years of experience working with kids of all ages and providing insightful training</p>
                 </div>
                 </div>
           <div class='grid'>
                 <div class='icon'>
              <i class="fa fa-soccer-ball-o"></i>
               </div>
               <div>
                 </div>
               <div class='desc'>
                 <h2>Brush up on your football technique</h2>
                 <p>It is essential that kids learn the basics and that is what we focus on as they have all the fundamentals in place</p>
                 </div>
                 </div>
 <div class='grid'>
                 <div class='icon'>
              <i class="fa fa-volume-control-phone"></i>
               </div>
               <div class='desc'>
                 <h2>Quality support and service</h2>
                 <p>We will provide our exper service after sessions through regular reports and updates through our progress chart</p>
                 </div>
                 </div>
           </section>
           <section id='training example'>
             <iframe id='video' height='315' src='https://www.youtube.com/watch?v=H5SMtN6Qa6w&pp=ygURZm9vdGJhbGwgdHJhaW5pbmc%3D' frameborder='0' allowfullscreen>
             </iframe>
             </section>
             <section id='pricing'>
               <div class='product' id='1 session'></div>
               <h2>1 session</h2>
               <ol>
                 </ol>
                 <li>£30 per hour</li>
                 <li>basic training</li>
                 <li>ballwork</li>
                 <button class='btn'>Select</button>
                 <div class='product' id='4 sessions'></div>
               <h2>4 sessions</h2>
               <ol>
                 </ol>
                 <li>£25 per hour</li>
                 <li>basic training</li>
                 <li>ballwork</li>
                 <li>Notes sent at the end of session</li>
                 <li>Phone call discussions</li>
                 <button class='btn'>Select</button>
                 <div class='product' id='10 sessions'></div>
               <h2>10 sessions</h2>
               <ol>
                 </ol>
                 <li>£25 per hour</li>
                 <li>basic training</li>
                 <li>ballwork</li>
                 <li>Notes sent at the end of session</li>
                 <li>Phone call discussions</li>
                 <li>Fitness work
                   </li>
                   <li>
                     Nutrition Guide
                   </li>
                 <button class='btn'>Select</button>
               </section>
                <footer>
          <ul>
            <li><a href="#footer">Privacy</a></li>
            <li><a href="#footer">Terms</a></li>
            <li><a href="#footer">Contact</a></li>
          </ul>
          <span>Copyright Football Coaching</span>
        </footer>
      </div>
    </div>
</body>
</html>

You only pasted your HTML in here. The three remaining tests that are passing all have to do with your CSS. So you’ll need to paste that in here as well.

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #eee;
  font-family: 'Lato', sans-serif;
}

#page-wrapper {
  position: relative;
}

li {
  list-style: none;
}

a {
  color: #000;
  text-decoration: none;
}

.container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

.btn {
  padding: 0 20px;
  height: 40px;
  font-size: 1em;
  font-weight: 900;
  text-transform: uppercase;
  border: 3px black solid;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}

.grid {
  display: flex;
}

header {
  position: fixed;
  top: 0;
  min-height: 75px;
  padding: 0px 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #eee;
}

@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
  }
}
nav {
  font-weight: 400;
  width: 50%;
  max-width: 300px;
  height: 50px;
}

@media (max-width: 650px) {
  nav {
    margin-top: 10px;
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 50px;
    position: static;
  }
  nav li {
    padding-bottom: 5px;
  }
}

nav > ul {
  width: 35vw;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  padding-inline-start: 0;
  margin-block: 0;
  height: 100%;
}

@media (max-width: 650px) {
  nav > ul {
    flex-direction: column;
  }
}

#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 200px;
  margin-top: 50px;
}

#hero > h2 {
  margin-bottom: 20px;
  word-wrap: break-word;
}

#hero input[type='email'] {
  max-width: 275px;
  width: 100%;
  padding: 5px;
}

#hero input[type='submit'] {
  max-width: 150px;
  width: 100%;
  height: 30px;
  margin: 15px 0;
  border: 0;
  background-color: #f1c40f;
}

#hero input[type='submit']:hover {
  background-color: orange;
  transition: background-color 1s;
}

@media (max-width: 650px) {
  #hero {
    margin-top: 120px;
  }
}

#bio {
  margin-top: 30px;
}

#bio .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 125px;
  width: 20vw;
  color: darkorange;
}

@media (max-width: 550px) {
  #bio .icon {
    display: none;
  }
}

#bio .desc {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 125px;
  width: 80vw;
  padding: 5px;
}

@media (max-width: 550px) {
  #bio .desc {
    width: 100%;
    text-align: center;
    padding: 0;
    height: 150px;
  }
}

@media (max-width: 650px) {
  #bio {
    margin-top: 0;
  }
}

#what-to-know {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

#what-to-know > iframe {
  max-width: 560px;
  width: 100%;
}

#pricing {
  margin-top: 60px;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.product {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: calc(100% / 3);
  margin: 10px;
  border: 1px solid #000;
  border-radius: 3px;
}

.product > .level {
  background-color: #ddd;
  color: black;
  padding: 15px 0;
  width: 100%;
  text-transform: uppercase;
  font-weight: 700;
}

.product > h2 {
  margin-top: 15px;
}

.product > ol {
  margin: 15px 0;
}

.product > ol > li {
  padding: 5px 0;
}

.product > button {
  border: 0;
  margin: 15px 0;
  background-color: #f1c40f;
  font-weight: 400;
}

.product > button:hover {
  background-color: orange;
  transition: background-color 1s;
}

@media (max-width: 800px) {
  #pricing {
    flex-direction: column;
  }
  .product {
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 10px;
  }
}

footer > ul {
  display: flex;
  justify-content: flex-end;
}

footer > ul > li {
  padding: 0 10px;
}

footer > span {
  margin-top: 5px;
  display: flex;
  justify-content: flex-end;
  font-size: 0.9em;
  color: #444;
}
1 Like

is there something i am missing to keep the navigation at the top?

1 Like

also the 3 session options i have listed overlap each other in the preview, i want them to be listed.

1 Like

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