<!-- on Bootstrap v5.0 simply add fixed-top class to nav.navbar --> <nav class="navbar fixed-top navbar-light bg-light"> <div class="container-fluid"> <a class="navbar-brand" href="#">Fixed top</a> </div> </nav>

navbar fixed top bootstrap 5

<section id="headnev" class="navbar navbar-fixed-top">

bootstrap navbar fixed top