Product Landing Page - Build a Product Landing Page

Tell us what’s happening:

Describe your issue in detail here.

I’m trying to create a nav bar that is responsive but i can’t get space between the links and have it size correctly. i’m trying to practice responsive designs on the navbar and i’m utilizing flexbox to try and space them evenly like i did with the three divs on the bottom. Could some one point me in the right direction? My code will pass the test but it will look bad. I have been at this for hours and i just want to optimize and publish a half decent website this time instead of just passing the test.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css"
  </head>
  <body>
  <header id="header">
   <img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png" id="header-img">
    <nav id="nav-bar">
      <ul>
        <li><a class="nav-link" href="#features">Features</a></li>
        <li><a class="nav-link" href="#works">How It Works</a></li>
        <li><a class="nav-link" href="#pricing">Pricing</a></li>
      </ul>
    </nav>
  </header>
  <main>
    <section id="features">
    <form id="form" action="https://www.freecodecamp.com/email-submit">
    <h2>Handcrafted, home-made masterpieces</h2>
    <input id="email" name="email" type="email" placeholder="type some shit here yo">
    <br><br>
    <input type="submit" id="submit" value="GET STARTED">
    </form>
    </section>
<section>
<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>
<br>
</section>
<sectin id="works">
<iframe id="video" src="https://www.youtube-nocookie.com/embed/y8Yv4pnO7qc?si=H5EF3Zn0bLaRKIaJ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</section>
<br><br>
<section id="pricing">
  <div><h2>TENOR TROMBONE</h2><p>$600</p><p>Lorem ipsum.
Lorem ipsum.
Lorem ipsum dolor.
Lorem ipsum.</p><input type="button" value="SELECT"></div>
  <div><h2>BASS TROMBONE</h2><p>$900</p><p>Lorem ipsum.
Lorem ipsum.
Lorem ipsum dolor.
Lorem ipsum.</p><input type="button" value="SELECT"></div>
  <div><h2>VALVE TROMBONE</h2><p>$1200</p><p>Lorem ipsum.
Lorem ipsum.
Lorem ipsum dolor.
Lorem ipsum.</p><input type="button" value="SELECT"></div>
<section>
  </main>
  <footer>
    <ul>
      <li><a href="">Privacy</a></li>
      <li><a href="">Terms</a></li>
      <li><a href="">Contact</a></li>
    </ul>
    <p>Copyright 2016, Original Trombones</p>
  </footer>
</body>
</html>
/* file: styles.css */
* {
  text-align: center;
  box-sizing: border-box;
}

html {
  background: ghostwhite;
}

li {
  list-style-type: none;
  display: inline-block;
}

img {
  width: 100px;
  display: inline-block;
  position: relative;
  left: -40;
}

header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10%;
  position: fixed;
  top: 0;
  background: lightgray;
}

nav ul {
  display: flex;
}

#nav-bar {

}

.nav-links {
  
}

main {
  margin-top: 125px;
}

h2 {
  margin: 0;
  font-size: 100%;
}

p {
  font-size: 100%;
}

#pricing {
  display: flex;
  gap: 2.5%;
}

div {
    border: 2px solid black;    
}

footer, h2 {
  background: lightgray;
}

iframe {
  width: 60%;
  aspect-ratio: 16/9;
  min-width: 200px;
}

@media {
  {

  }
}

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Product Landing Page - Build a Product Landing Page

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

  • make use of “width” preferably in “nav-bar” or “nav ul”

happy coding :slight_smile:

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