Place menu in the bottom margin of the Bootstrap 3 navbar

Asked

Viewed 272 times

2

I have the following menu:

inserir a descrição da imagem aqui

It got this big because the customer demanded the logo to get bigger, but the menu was at the top of the navbar. How do I get her to the bottom of the navbar?

<nav class="navbar navbar-inverse" style="background: #00253f; height: 110px">
  <div class="container-fluid">
    <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>
      </button>
      <a class="navbar-brand" href="#"><img src="images/logo.png" style="width: 150px"></a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#">Início</a></li>
        <li><a href="#">Quem Somos</a></li>
        <li><a href="#">Serviços</a></li>
        <li><a href="#">Galeria</a></li>
        <li><a href="#">Contato</a></li>
      </ul>
    </div>
  </div>
</nav>

1 answer

2


To remove the round corners:

.navbar{
   border-radius: 0;
}

Place the menu in the bottom right corner:

#myNavbar{
   position: absolute;
   bottom: 0;
   right: 0;
}

Example (run in full screen):

.navbar{
   border-radius: 0;
}

#myNavbar{
   position: absolute;
   bottom: 0;
   right: 0;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<nav class="navbar navbar-inverse" style="background: #00253f; height: 110px">
  <div class="container-fluid">
    <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>
      </button>
      <a class="navbar-brand" href="#"><img src="images/logo.png" style="width: 150px"></a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav navbar-right navbar-bottom">
        <li><a href="#">Início</a></li>
        <li><a href="#">Quem Somos</a></li>
        <li><a href="#">Serviços</a></li>
        <li><a href="#">Galeria</a></li>
        <li><a href="#">Contato</a></li>
      </ul>
    </div>
  </div>
</nav>

  • Ball Show Sam. Many thanks again!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.