I have tried numerous threads on Stack Overflow and also this one, but I still can't seem to get it right. My goal is to have a fixed navbar at the top using Bootstrap 4, but for some reason, the navbar keeps shifting upwards. I've even added padding in the CSS as per the official documentation, but the content is moving instead of the navbar. Below is the image of the default navbar: https://i.sstatic.net/g9R1R.png
And here is what my fixed navbar currently looks like: https://i.sstatic.net/c07Tz.png I'm not sure what I'm doing wrong. Here is my code:
<nav class="navbar fixed-top navbar-light bg-light">
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item-active">
<a class="nav-link" href="#/">Home<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#/product">Products</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#/services">Services</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#/career">Career</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#/contact">Contact Us</a>
</li>
</ul>
</div>
</nav>
Any assistance would be greatly appreciated.