Tell us what’s happening:
my code is working just fine but for some reason I can’t pass the test below
Each .nav-linkelement should link to a corresponding element on the landing page (has anhrefwith a value of another element's id. e.g.#footer ).
Your code so far
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="styles.css" />
<title>Landing Page</title>
</head>
<body>
<header id="header">
<div class="logo">
<img id="header-img" alt="Logo" src="./product-landing-page-logo.png" />
</div>
<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 class="sep"></div>
<section id="hero">
<h2>Handcrafted, home-made masterpieces</h2>
<form id="form" action="https://www.freecodecamp.com/email-submit">
<input
required
type="email"
placeholder="Enter your email address"
id="email"
name="email"
/>
<input type="submit" value="GET STARTED" id="submit" />
</form>
</section>
<div class="container">
<section id="Features">
<div class="feature">
<div class="icon">
<i class="fa fa-3x fa-fire"></i>
</div>
<div class="desc">
<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="feature">
<div class="icon">
<i class="fa fa-3x fa-truck"></i>
</div>
<div class="desc">
<h2>Fast Shipping</h2>
<p>
We make sure you receive 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="feature">
<div class="icon">
<i class="fa fa-3x fa-battery-full" aria-hidden="true"></i>
</div>
<div class="desc">
<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"
height="315"
width="560"
src="https://www.youtube-nocookie.com/embed/y8Yv4pnO7qc?rel=0&controls=0&showinfo=0"
frameborder="0"
allowfullscreen=""
></iframe>
</section>
<section id="pricing">
<div class="product" id="tenor">
<div class="level">TENOR TROMBONE</div>
<h2>$600</h2>
<ol>
<li>Lorem ipsum</li>
<li>Lorem ipsum</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum</li>
</ol>
<button class="btn">SELECT</button>
</div>
<div class="product" id="bass">
<div class="level">BASS TROMBONE</div>
<h2>$900</h2>
<ol>
<li>Lorem ipsum</li>
<li>Lorem ipsum</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum</li>
</ol>
<button class="btn">SELECT</button>
</div>
<div class="product" id="valve">
<div class="level">VALVE TROMBONE</div>
<h2>$1200</h2>
<ol>
<li>Plays similar to a Trumpet</li>
<li>Great for Jazz Bands</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum</li>
</ol>
<button>SELECT</button>
</div>
</section>
</div>
<footer>
<ul>
<li><a href="#">Privacy</a></li>
<li><a href="#">Terms</a></li>
<li><a href="#">Contact</a></li>
</ul>
<span>Copyright 2016, Original Trombones</span>
</footer>
</body>
</html>
CSS:
/* Globals */
:root {
--primary-color: #eee;
--secondary-color: #ddd;
--button-color: #f1c40f;
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
font-family: "Lato", sans-serif;
background-color: var(--primary-color);
}
.container {
max-width: 1000px;
width: 100%;
margin: 0 auto;
}
/* NAV BAR */
#header {
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
min-height: 75px;
position: fixed;
z-index: 1;
background-color: var(--primary-color);
top: 0;
padding: 0 20px;
}
.logo {
width: 60vw;
}
.logo > img {
width: 100%;
height: 100%;
max-width: 300px;
margin-left: 15px;
}
ul {
width: 35vw;
list-style-type: none;
display: flex;
justify-content: space-evenly;
align-items: center;
}
.nav-link {
text-decoration: none;
color: black;
display: block;
}
.sep {
width: 100%;
margin-top: 75px;
}
/* Sections */
#hero {
margin: 0 auto;
width: 50%;
min-width: 200px;
text-align: center;
margin-bottom: 100px;
}
#hero h2 {
margin: 20px 0;
}
input {
display: block;
height: 30px;
margin: 15px auto;
padding: 5px;
}
#email {
max-width: 270px;
width: 60%;
}
#submit {
width: 40%;
max-width: 150px;
border: none;
background-color: var(--button-color);
font-weight: 900;
font-size: 1rem;
}
/* Features */
.feature {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
margin: 50px;
}
@media only screen and (max-width: 770px) {
.feature {
margin: 0;
}
}
.icon {
width: 20%;
display: flex;
justify-content: center;
align-items: center;
color: darkorange;
}
.desc {
width: 80%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
}
.desc h2 {
font-weight: 600;
}
.desc p {
width: 85%;
max-width: 780px;
}
/* How it works */
#how-it-works {
margin-top: 50px;
display: flex;
justify-content: center;
}
/* Pricing */
#pricing {
margin-top: 100px;
display: flex;
justify-content: space-evenly;
align-items: center;
}
.product {
border: 1px solid black;
width: 30%;
height: 350px;
text-align: center;
}
.level {
background-color: var(--secondary-color);
padding: 15px;
margin-bottom: 25px;
font-weight: 700;
}
ol {
margin: 30px 0;
list-style-type: none;
display: flex;
height: 30%;
flex-direction: column;
justify-content: space-between;
}
.product button {
background-color: var(--button-color);
font-size: 1rem;
border: none;
margin-top: 20px;
padding: 10px 20px;
}
/* FOOTER */
footer {
margin-top: 50px;
background-color: var(--secondary-color);
padding: 20px;
}
footer ul {
width: 100%;
display: flex;
justify-content: flex-end;
}
footer li {
padding: 10px;
}
footer a {
text-decoration: none;
color: black;
}
footer span {
display: flex;
justify-content: flex-end;
font-size: 0.9rem;
opacity: 0.8;
}
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/110.0.0.0 Safari/537.36
Challenge: Product Landing Page - Build a Product Landing Page
Link to the challenge: