Tell us what’s happening:
Describe your issue in detail here.
I’ve tried everything i think i can but i keep on getting " Your #nav-bar
should always be at the top of the viewport."
Can anyone spot my mistake and correct me pls?
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html>
<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">
<div class="logo">
<img id="header-img" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png" alt="Original Trombones Logo">
</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>
<form id="form" action="https://www.freecodecamp.com/email-submit">
<h2>Handcrafted, home-made masterpieces</h2>
<input id="email" name="email" type="email" placeholder="Enter your email address">
<input id="submit" type="submit">
</form>
</div>
<section id="Features">
</section>
<section id="How_It_Works">
<video id="video" src="https://youtu.be/y8Yv4pnO7qc">
</section>
<section id="Pricing">
</section>
</body>
</html>
/* file: styles.css */
html{
box-sizing: border-box;
}
body{
font-family: sans-serif;
}
header{
display: flex;
}
img{
width: 250px;
position: relative;
margin-top: 20px;
}
nav{
display: flex;
flex-direction:column;
width: 100%;
text-align: center;
padding: 0 50px;
}
ul{
list-style: none;
display: flex;
}
form{
text-align: center;
}
@media (max-width: 960px) {
.nav-link{
display: flex;
flex-direction: row;
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Challenge Information:
Product Landing Page - Build a Product Landing Page