Mi barra de navegación desaparece totalmente y solo me queda el texto en la clase navbar-brand. Ni siquiera tengo el botón de alternar.

Cualquier ayuda es muy apreciada.

#custom-bootstrap-menu.navbar-default .navbar-brand {
  color: rgba(171, 106, 106, 1);
}
#custom-bootstrap-menu.navbar-default {
  font-size: 14px;
  background-color: rgba(255, 255, 255, 1);
  border-width: 0px;
  border-radius: 4px;
}
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a {
  color: rgba(0, 0, 0, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a:hover,
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a:focus {
  color: rgba(27, 219, 81, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a,
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a:hover,
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a:focus {
  color: rgba(14, 145, 40, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-toggle {
  border-color: #ffffff;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle:hover,
#custom-bootstrap-menu.navbar-default .navbar-toggle:focus {
  background-color: #ffffff;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle .icon-bar {
  background-color: #ffffff;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle:hover .icon-bar,
#custom-bootstrap-menu.navbar-default .navbar-toggle:focus .icon-bar {
  background-color: #ffffff;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />

<div id="custom-bootstrap-menu" class="navbar navbar-default " role="navigation">
  <div class="container-fluid">

    <div class="navbar-header">
      <a class="navbar-brand" href="#">Image</a>
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-menubuilder">
        <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 class="collapse navbar-collapse navbar-menubuilder">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="/">Home</a>
        </li>
        <li><a href="/products">Products</a>
        </li>
        <li><a href="/about-us">About Us</a>
        </li>
        <li><a href="/contact">Contact Us</a>
        </li>
      </ul>
    </div>

  </div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

Probablemente sea un detalle menor, pero me lo pierdo independientemente de los tutoriales.

Gracias de antemano.

1
Ela Buwa 29 dic. 2016 a las 09:20

3 respuestas

La mejor respuesta

El menú no está desapareciendo, está configurando su color en blanco en su CSS personalizado (las últimas kines de su código). Lo cambié a rojo aquí.

#custom-bootstrap-menu.navbar-default .navbar-brand {
  color: rgba(171, 106, 106, 1);
}
#custom-bootstrap-menu.navbar-default {
  font-size: 14px;
  background-color: rgba(255, 255, 255, 1);
  border-width: 0px;
  border-radius: 4px;
}
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a {
  color: rgba(0, 0, 0, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a:hover,
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a:focus {
  color: rgba(27, 219, 81, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a,
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a:hover,
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a:focus {
  color: rgba(14, 145, 40, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-toggle {
  border-color: #ffffff;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle:hover,
#custom-bootstrap-menu.navbar-default .navbar-toggle:focus {
  background-color: red;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle .icon-bar {
  background-color: red;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle:hover .icon-bar,
#custom-bootstrap-menu.navbar-default .navbar-toggle:focus .icon-bar {
  background-color: white;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />

<div id="custom-bootstrap-menu" class="navbar navbar-default" role="navigation">
  <div class="container-fluid">

    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-menubuilder">
        <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="#">Image</a>
    </div>

    <div class="collapse navbar-collapse navbar-menubuilder">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="/">Home</a>
        </li>
        <li><a href="/products">Products</a>
        </li>
        <li><a href="/about-us">About Us</a>
        </li>
        <li><a href="/contact">Contact Us</a>
        </li>
      </ul>
    </div>

  </div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
3
vanburen 29 dic. 2016 a las 06:52

Esto sucede porque configura el color en #ffffff para que no desaparezca solo porque no se visualiza el mismo color de fondo. Acabo de cambiar a #000000 y se ve bien.

#custom-bootstrap-menu.navbar-default .navbar-brand {
  color: rgba(171, 106, 106, 1);
}
#custom-bootstrap-menu.navbar-default {
  font-size: 14px;
  background-color: rgba(255, 255, 255, 1);
  border-width: 0px;
  border-radius: 4px;
}
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a {
  color: rgba(0, 0, 0, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a:hover,
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a:focus {
  color: rgba(27, 219, 81, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a,
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a:hover,
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a:focus {
  color: rgba(14, 145, 40, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-toggle {
  border-color: #000000;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle:hover,
#custom-bootstrap-menu.navbar-default .navbar-toggle:focus {
  background-color: #ffffff;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle .icon-bar {
  background-color: #000000;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle:hover .icon-bar,
#custom-bootstrap-menu.navbar-default .navbar-toggle:focus .icon-bar {
  background-color: #ffffff;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />

<div id="custom-bootstrap-menu" class="navbar navbar-default" role="navigation">
  <div class="container-fluid">

    <div class="navbar-header"><a class="navbar-brand" href="#">Image</a>
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-menubuilder">
        <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 class="collapse navbar-collapse navbar-menubuilder">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="/">Home</a>
        </li>
        <li><a href="/products">Products</a>
        </li>
        <li><a href="/about-us">About Us</a>
        </li>
        <li><a href="/contact">Contact Us</a>
        </li>
      </ul>
    </div>

  </div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
0
vanburen 29 dic. 2016 a las 06:58
#custom-bootstrap-menu.navbar-default .navbar-brand {
  color: rgba(171, 106, 106, 1);
}
#custom-bootstrap-menu.navbar-default {
  font-size: 14px;
  background-color: rgba(255, 255, 255, 1);
  border-width: 0px;
  border-radius: 4px;
}
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a {
  color: rgba(0, 0, 0, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a:hover,
#custom-bootstrap-menu.navbar-default .navbar-nav>li>a:focus {
  color: rgba(27, 219, 81, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a,
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a:hover,
#custom-bootstrap-menu.navbar-default .navbar-nav>.active>a:focus {
  color: rgba(14, 145, 40, 1);
  background-color: rgba(255, 255, 255, 1);
}
#custom-bootstrap-menu.navbar-default .navbar-toggle {
  border-color: #ffffff;
  background: #ccc;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle:hover,
#custom-bootstrap-menu.navbar-default .navbar-toggle:focus {
  background-color: #ccc;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle .icon-bar {
  background-color: #ffffff;
}
#custom-bootstrap-menu.navbar-default .navbar-toggle:hover .icon-bar,
#custom-bootstrap-menu.navbar-default .navbar-toggle:focus .icon-bar {
  background-color: #ffffff;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />

<div id="custom-bootstrap-menu" class="navbar navbar-default " role="navigation">
  <div class="container-fluid">

    <div class="navbar-header"><a class="navbar-brand" href="#">Image</a>
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-menubuilder">
        <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 class="collapse navbar-collapse navbar-menubuilder">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="/">Home</a>
        </li>
        <li><a href="/products">Products</a>
        </li>
        <li><a href="/about-us">About Us</a>
        </li>
        <li><a href="/contact">Contact Us</a>
        </li>
      </ul>
    </div>

  </div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
0
vanburen 29 dic. 2016 a las 06:59