Set Bootstrap navigation menu to fixed position using CSS

Last Reply 10 days ago By nedash

Posted 10 days ago

hi

I used bootstrap4 and use navigation menu for it below are codes

when I click on menu at first it moves at the left side of the page then open menu I want it doesn't move and fixed on define a place

<nav class="navbar navbar-light bg-light navbar-expand-lg">  
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item active">
        <a runat="server" class="nav-link">Home <span class="sr-only">(current)</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>
   
      <li class="nav-item">
        <a class="nav-link disabled" href="#">Disabled</a>
      </li>
    </ul>  
  </div>
</nav>

what should I do?

best regards

Neda

You are viewing reply posted by: nedash 10 days ago.
Posted 10 days ago

thanks, I found the problem

I add below code to my codes

  <a class="navbar-brand" href="#"></a>

best regards

Neda