Hello all, I am struggling to clear a project user story as it explains that the navbar should always be located at the top of the viewport, however i am quit confused as the code and the codepen shows that it is at the top of the viewport. The actual codepen console goes onto to explain that it should be at the top even when scrolling but since i need to use flexbox for this task I don’t imagine i am expected to use ‘position: fixed’ on the navbar.
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<html>
<head>
<title>StarWalls - Lightyears ahead</title>
</head>
<body>
<header id="header">
<nav id="nav-bar">
<img id="header-img" src="https://cdn.shopify.com/s/files/1/0023/5431/5327/files/61.6KB_x100.jpg?v=1553920971" alt="star walls logo">
<ul class="nav-links">
<li class="nav-link"><a href="#">Home</a></li>
<li class="nav-link"><a href="#">About</a></li>
<li class="nav-link"><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<div id="section2">
<video id="video" width="500" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support video.
</video>
</div>
<div id="section3">
<form id="form" action="https://www.freecodecamp.com/email-submit">
<input id="email" type="email" name="email" placeholder="Enter email" required>
<input id="submit" type="submit">
</form>
</div>
<div id="footer">
<div class="blackbox">
</div>
<div class="blackbox">
</div>
<div class="blackbox">
</div>
</div>
CSS
#nav-bar {
display: flex;
justify-content: space-between;
}
.nav-links {
display: flex;
list-style: none;
}
.nav-link a {
display: inline-block;
padding: 10px 25px;
}
.blackbox{
width: 150px;
height: 150px;
border-color: black;
border-style: solid;
}
#footer {
display: flex;
justify-content: space-around;
width: 100%;
height: 300px;
align-items: flex-end;
}
#section2 {
display: flex;
justify-content: center;
}
#section3 {
display: flex;
justify-content: center;
margin-top: 100px
}