Bootstrap - bottom level menu in navbar

I need to align my menu text with the bottom of a Bootstrap 3 navbar.

My code:

    <nav class="navbar navbar-default">
      <div class="container">
        <div class="navbar-header">
           <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
           </button>
         <a class="navbar-brand" href="#"><img class="img-responsive" src="/assets/img/outa.png" width="120px;"/></a>
        </div>
        <div class="collapse navbar-collapse" id="myNavbar">
          <ul class="nav navbar-nav pull-right">
              <li><a href="/browser/saved/">Saved searches</a></li>
              <li><a href="../index.html">Settings</a></li>
              <li><a href="../index.html">About</a></li>
              <li><a href="../index.html">Sign In</a></li>
          </ul>
        </div>
      </div>
    </nav>
      

Run codeHide result


This centers the menu vertically in the shaded navigation bar. Can I change this so that the menu is 4 pixels above the bottom of the shaded area of ​​the navigator?

+3


source to share


1 answer


This should do the trick.

#myNavbar {
    position: relative;
}

#myNavbar .nav {
    position: absolute; 
    bottom: 0; 
    right: 0;
    margin-bottom: -10px;
}

      



JSFiddle

+1


source







All Articles