Boostrap menu with two lines

Asked

Viewed 764 times

1

Is it possible to create a menu in Boostrap using two lines? I have several items to put in a menu, I’m decreasing the font, I took up the logo, but I didn’t like the result. I would like to have 2 lines, to balance the font size and use the logo.

 <!-- Fixed navbar -->
  <nav class="navbar navbar-default navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
      </div>
      <div id="navbar" class="navbar-collapse collapse">
        <ul class="nav navbar-nav">
          <li class="active"><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Principal</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">O Fundador</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">O centro</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Reinserção</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Fotos</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Como encaminhar</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Equipe Técnica</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Prog. Terapêutica</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Outros Serviços</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Testemunhos</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Triagem</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Comunidade Evangélica</a></li>
          <li><a style="font-size:0.8em; padding:10px; margin-top: 10px;" href="#">Fale Conosco</a></li>
        </div><!--/.nav-collapse -->
      </div>
    </nav>
  • I didn’t understand very well, how so two lines? You decide which items will be in the top row and the bottom?

  • Exact, manually, not automatically, according to screen size.

  • Example: http://imgur.com/a/q5F40

  • Cannot place within sub-categories in a dropdown?

  • Well I wanted to, but the client is irreducible. If I do not find a solution, I will have to suggest something different.

  • In my navbar do not want to give at all, send me your result please...

Show 1 more comment

1 answer

0


Hello friend see code below is basically what you need, hugs.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <link rel="stylesheet" href="css/style.css">
</head>

<body>
  <header>
    <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navegacion-rb">
            <span class="sr-only">Visualizar / Ocultar Menu</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a href="#" class="navbar-brand">LOGOTIPO</a>
        </div>
        <!-- INICIO DO MENU -->
        <div class="collapse navbar-collapse" id="navegacion-rb">
            <ul class="nav navbar-nav pull-right ">
              <li class="my-links"><a class="links" href="#">Home</a></li>
              <li class="my-links"><a class="links" href="#">Principal</a></li>
              <li class="my-links"><a class="links" href="#">O Fundador</a></li>
              <li class="my-links"><a class="links" href="#">O centro</a></li>
              <li class="my-links"><a class="links" href="#">Fotos</a></li>
              <li class="my-links"><a class="links" href="#">Como encaminhar</a></li>
              <li class="my-links"><a class="links" href="#">Prog. Terapêutica</a></li>
            </ul>

            <ul class="nav navbar-nav pull-right ">
              <li class="my-links"><a class="links" href="#">Prog. Terapêutica</a></li>
              <li class="my-links"><a class="links" href="#">Equipe Técnica</a></li>
              <li class="my-links"><a class="links" href="#">Serviços</a></li>
              <li class="my-links"><a class="links" href="#">Diversos</a></li>
              <li class="my-links"><a class="links" href="#">Testemunhos</a></li>
              <li class="my-links"><a class="links" href="#">Triagem</a></li>
              <li class="my-links"><a class="links" href="#">Comunidade Evangélica</a></li>
            </ul>

        </div>
      </div>
    </nav>
  </header>

  <script src="js/jquery-3.2.1.min.js"></script>
  <script src="js/bootstrap.min.js"></script>
</body>
</html>

Browser other questions tagged

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