Tell us what’s happening:
The error message I keep getting is “make sure nav-bar is always at the top”
And how can I make each of the price box stand on their own
Your code so far
<!DOCTYPE html>
<html lanh="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, intial-scal=1.0">
<title>freeCodeCamp Landing Page</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div id="header-container">
<header id="header">
<img id="header-img" src="https://s3.amazonaws.com/freecodecamp/original_trombones.png"
alt="original trombones logo">
<nav id="nav-bar">
<ul>
<li><a class="nav-link" href="#features">Features</a></li>
<li><a class="nav-link" href="#how-it-works">How It Works</a></li>
<li><a class="nav-link" href="#pricing">Pricing</a></li>
</ul>
</nav>
</header>
</div>
<section id="home">
<h1>Handcrafted, home-made masterpieces</h1>
<form id="form" action="https://www.freecodecamp.com/email-submit">
<input id="email" name="email" placeholder="Enter email address" type="email"></br>
<input id="submit" type="submit" value="Get started"></input>
</div>
</section>
<div class="icon"></div>
<section id="features">
<div class="row">
<div class="icon">
<i class="fa fa-3x fa-fire"></i>
</div>
<div class="description">
<h2>Premium Materials</h2>
<p>Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase</p>
</div>
</div>
<div class="row">
<div class="icon">
<i class="fa fa-3x fa-truck"></i>
</div>
<div class="description">
<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>
</div>
</div>
<div class="row">
<div class="icon">
<i class="fa fa-3x fa-truck"></i>
</div>
<div class="description">
<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>
</div>
</div>
<div class="row">
<div class="icon">
<i class="fa fa-3x fa-battery-full"></i>
</div>
<div class="description">
<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>
</div>
</div>
</section>
<section id="how-it-works">
<iframe id="video" width="500" height="350" src="https://www.youtube-nocookie.com/embed/y8Yv4pnO7qc?rel=0&controls=0&showinfo=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</section>
<section id="pricing">
<div class="product">
<div class="title-box">TENOR TROMBONE</div>
<div class="description-box">
<p class="price">$600</p>
<p>Lorem ipsum.</p>
<p>Lorem ipsum.</p>
<p>Lorem ipsum dolor.</p>
<p>Lorem ipsum.</p>
<button>Select</button>
</div>
<div class="product">
<div class="title-box">TENOR TROMBONE</div>
<div class="description-box">
<p class="price">$900</p>
<p>Lorem ipsum.</p>
<p>Lorem ipsum.</p>
<p>Lorem ipsum dolor.</p>
<p>Lorem ipsum.</p>
<button>Select</button>
</div>
<div class="product">
<div class="title-box">TENOR TROMBONE</div>
<div class="description-box">
<p class="price">$1200</p>
<p>Lorem ipsum.</p>
<p>Lorem ipsum.</p>
<p>Lorem ipsum dolor.</p>
<p>Lorem ipsum.</p>
<button>Select</button>
</div>
</section>
<footer>
<ul>
<li><a href="#">Privacy</a></li>
<li><a href="#">Terms</a></li>
<li><a href="#">Contact</a></li>
</ul>
<span class="copyright">Copyright 2022</span>
</footer>
</body>
</html>
body {
background-color: #f6f8e8;
color: #010101;
font-size: 8px;
font-family: 'halvetica', san-serif;
}
#header-container {
width: 100%;
height: 50px;
position: fixed;
}
#header-img {
width: 100px;
margin: 8px;
display: flex;
float: left;
}
#nav-bar {
width:100%;
height: 50px;
margin: 8px;
}
#nav-bar ul {
list-style: none;
justify-content: space-evenly;
text-align: center;
display: flex;
padding: 10px;
}
.nav-link{
text-decoration: none;
color: #010101;
}
#nav-bar ul li:hoover {
background: whitesmoke;
}
h1 {
font-size: 10px;
text-align: center;
}
#form {
text-align: center;
font-size: 10px;
}
#email {
width: 30%;
height: 10px;
margin: 0;
padding: 0;
font-size: 5px;
}
#submit {
background-color: #ffdc00;
margin: 5px 0 0 0;
padding: 2px 4px;
font-size: 6px;
border: 0;
text-transform: uppercase;
}
.description {
margin: auto;
padding: 3px;
width: 80%;
font-size: 8px;
}
#video {
margin: auto;
display: block;
padding-top: 10px;
}
#pricing {
display: flex;
flex-direction: row;
justify-content: center;
}
.product {
border: 1px solid black;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
width: 100px;
padding: 5px 10px;
}
.title-box {
background-color: lightgray;
width: 100px;
text-align: center;
font-size: 10px;
padding: 5px 10px;
margin: 0;
}
button {
border: 1px solid #f6f8e8;
border-radius: 3px;
width: 50px;
text-align: center;
text-transform: uppercase;
font-size: 10px;
padding: 3px 0;
background-color: #ffdc00;
}
footer {
display: flex;
justify-content: center;
float: left;
}
footer ul {
justify-content: space-evenly;
}
footer li {
list-style-type: none;
text-align: center;
}
footer a {
text-decoration: none;
color: #010101;
}
footer li:hover {
background: whitesmoke;
}
footer > span {
margin-top: 5px;
display: flex;
float: left;
font-size: 0.9em;
color: #444;
}
@media screen only and (max-width: 320px) {
#nav-bar ul {
height: 250px;
flex-direction: column;
text-align: center;
}
}
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.87 Safari/537.36
Challenge: Product Landing Page - Build a Product Landing Page
Link to the challenge: