I want the navbar to remain in a fixed position. It works fine but the links aren't clickable in my showcase section. As soon as you scroll down it becomes clickable again. I need help understanding why this is happening
<nav id="nav-bar">
<h2 class="logo">
<span class="txt-primary"><i class="far fa-moon"></i></span> | MMM
</h2>
<ul>
<li class="nav-link"><a href="#about">About</a></li>
<li class="nav-link"><a href="#service">Services</a></li>
<li class="nav-link"><a href="#videos">Videos</a></li>
<li class="nav-link"><a href="#contact">Contact</a></li>
</ul>
</nav>
CSS:
#nav-bar {
display: flex;
position: fixed;
width: 100%;
background: rgba(60,3,56,0.8);
color: #dbd8e5;
justify-content: space-between;
padding: 0.4rem;
}
#nav-bar ul {
display: flex;
align-items: center;
}
#nav-bar ul li a {
padding: 0.55rem;
color: #7c72a0;
}
#nav-bar ul li a:hover {
background: #5f0d45;
color: #dbd8e5;
padding: 0.75rem;
}