I can’t handle the css from the Bootstrap Menu

Asked

Viewed 202 times

0

I’m developing a web application and I put a bootstrap menu but I’m not able to touch his css, I wish he had this look.

inserir a descrição da imagem aqui

UPDATE

But look at him go

inserir a descrição da imagem aqui

HTML

  <div class="body-wrap" >
  <div class="container" >
  <div id="menu">
  <nav class="navbar navbar-inverse" role="navigation"  >
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
        <a class="navbar-brand" href="#" >Menu</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
          <div class="conteudo"><li class="active"><a href="#">Pagina Principal</a></li></div> 
          <div class="conteudo"> <li><a href="#">Contato</a></li></div>
        <li class="dropdown">
            <div class="conteudo"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Produtos <b class="caret"></b></a></div>
          <ul class="dropdown-menu">
            <li><a href="#">Camisetas</a></li>
             <li class="divider"></li>
            <li><a href="#">Calças</a></li>
             <li class="divider"></li>
            <li><a href="#">Bermudas</a></li>
          </ul>
        </li>
      </ul>

    </div>
    <!-- /.navbar-collapse -->
  </div>
  <!-- /.container-fluid -->
</nav>

        </div>

CSS

 .navbar navbar-inverse{

            border-top: 1px solid black;
            border-bottom: 1px solid black;
            margin-top: 20px;
            background-color:#6495ED;
            text-align: center;
            padding: 10px !important;
             height: 40px;

        }


        .conteudo{
            display: inline;

        }

        a {
            padding: 10px !important;
            text-decoration: none;
            color: white;
        }

        li{

            display:inline;
            text-align: left;  
        }

1 answer

1


CSS

.navbar .navbar-inverse{

            border-top: 1px solid black;
            border-bottom: 1px solid black;
            margin-top: 20px;
            background-color:#6495ED;
            text-align: center;
            padding: 10px !important;
            height: 40px;
        }

        .navbar .navbar-nav {
          display: inline-block;
          float: none;
          vertical-align: top;
        }

        .navbar .navbar-collapse {
          text-align: center;
        }

Try using this css style.

source:https://stackoverflow.com/a/18778769/8738756

  • Guilherme Carvalho I updated the image of how this menu, it did not change the background color ,and did not increase the width

  • I didn’t change the color no, I just centered it, creates a class and adds it to the class, like. fundAzul{ background:blue;} and add in the Nav bar class. Or add in this navbar block . navbar-Nav { display: inline-block; float: None; vertical-align: top; }

Browser other questions tagged

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