I am just getting started as a beginner working on a Web application and utilizing Bootstrap 4 for my web design. I have a quick question that needs some clarification.
When the code is structured like this, the Navbar does not stay fixed at the top:
<nav class="navbar navbar-expand-sm navbar-dark sticky-top">
<div class="container" style="padding:0;">
<a class="navbar-brand text-info">The Bros</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="nav nav-justified">
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
</ul>
</div>
</div>
</nav>
However, by simply rearranging the order of the elements like below:
<div class="container" style="padding:0;">
<nav class="navbar navbar-expand-sm navbar-dark sticky-top">
The Navbar sticks to the top but I also want to add color to the background. Is there a way to achieve both functionalities simultaneously?