I’m currently working on a profolio. It says the navbar still needs to be on the top of the viewport. I’m really confused as I think I got it right.
Here’s my code:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<nav id="nav-bar">
<a href="#welcome-section" class="nav-link">Welcome</a>
<a href="#projects" class="nav-link">Projects</a>
</nav>
<section id="welcome-section">
<h1 id="name">Meet Henry V.</h1>
</section>
</body>
</html>
CSS:
body {
margin: 0;
padding: 0;
}
#nav-bar {
position: fixed;
width: 100%;
top: 0;
left: 0;
margin: 0;
padding: 0;
z-index: 9999;
}