My code is failing only one test:
Your #nav-bar
should always be at the top of the viewport.
I usually can find the CSS class in dev tools, but I have not been able to find ANY IDs. How can I find CSS IDs using dev tools? How can I position the ‘#nav-bar’ to always be at the top of the viewport?
Thank you!
<!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">
<title>Landing Page</title>
</head>
<body>
<div id="page-wrapper">
<header id="header">
<div class="logo">
<img src="https://cdn.pixabay.com/photo/2016/03/29/10/38/saxophone-1287911_1280.png" id="header-img" width="100vw"/>
</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="container"></div>
<section id="hero">
<h2>Handcrafted, home-made masterpieces</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-3x fa-fire">
</i>
</div>
<div class="desc">
<h2>Premium Materials</h2>
<p>Our saxophones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
</div>
</div>
<div class="grid">
<div class="icon">
<i class="fa fa-3x fa-truck"></i>
</div>
<div class="desc">
<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="grid">
<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" src="https://www.youtube.com/watch?v=Gdn5d55vArw&pp=ygUOc2F4b3Bob25lIHRyaW8%3D" frameborder="0" allowfullscreen></iframe>
</section>
<section id="pricing">
<div class="product" id="alto">
<div class="level">Alto Saxophone</div>
<h2>$600</h2>
<ol>
<li>Lorem ipsum.</li>
<li>Lorem ipsum.</li>
<li>Lorem ipsum.</li>
</ol>
<button class="btn">Select</button>
</div>
<div class="product" id="tenor"></div>
<div class="product" id="tenor">
<div class="level">Tenor Saxophone</div>
<h2>$900</h2>
<ol>
<li>Lorem ipsum.</li>
<li>Lorem ipsum.</li>
<li>Lorem ipsum.</li>
</ol>
<button class="btn">Select</button>
</div>
<div class="product" id="soprano"></div>
<div class="product" id="soprano">
<div class="level">Soprano Saxophone</div>
<h2>$900</h2>
<ol>
<li>Lorem ipsum.</li>
<li>Lorem ipsum.</li>
<li>Lorem ipsum.</li>
</ol>
<button class="btn">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>Copyright 2016, Original Saxophones</span>
</footer>
</div>
</div>
</body>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Challenge: Product Landing Page - Build a Product Landing Page
Link to the challenge: