No puedo cambiar color del navbar

publicado por: Anonymous

codigo de navbar.php

_x000D_

_x000D_

#footer{ background-color:#848484; } .navbar-default { background-color: #ed1b2d; border-color: #7a6b6b; } .navbar-default .navbar-brand { color: #ffffff; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus {_x000D_
  color: #ffffff; } .navbar-default .navbar-text { color: #ffffff; } .navbar-default .navbar-nav > li > a { color: #ffffff; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #ffffff; } .navbar-default .navbar-nav_x000D_
  > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { color: #ffffff; background-color: #7a6b6b; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default_x000D_
  .navbar-nav > .open > a:focus { color: #ffffff; background-color: #7a6b6b; } .navbar-default .navbar-toggle { border-color: #7a6b6b; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: #7a6b6b; } .navbar-default_x000D_
  .navbar-toggle .icon-bar { background-color: #ffffff; } .navbar-default .navbar-collapse, .navbar-default .navbar-form { border-color: #ffffff; } .navbar-default .navbar-link { color: #ffffff; } .navbar-default .navbar-link:hover { color: #ffffff; }_x000D_
  @media (max-width: 767px) { .navbar-default .navbar-nav .open .dropdown-menu > li > a { color: #ffffff; } .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { color: #ffffff;_x000D_
  } .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { color: #ffffff; background-color: #7a6b6b;_x000D_
  } }

_x000D_

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>_x000D_
<?php_x000D_
		if (isset($title))_x000D_
		{_x000D_
	?>_x000D_
_x000D_
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>_x000D_
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>_x000D_
  <nav class="navbar navbar-default navbar-fixed-top " role="navigation">_x000D_
    <div class="container-fluid">_x000D_
      <div class="navbar-header">_x000D_
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">_x000D_
        <span class="sr-only">Toggle navigation</span>_x000D_
        <span class="icon-bar"></span>_x000D_
        <span class="icon-bar"></span>_x000D_
        <span class="icon-bar"></span>_x000D_
		<span class="icon-bar"></span>_x000D_
	    <span class="icon-bar"></span>_x000D_
		 </button>_x000D_
        <a class="navbar-brand">Inventario Swisslub Area TIC</a>_x000D_
      </div>_x000D_
_x000D_
_x000D_
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">_x000D_
        <ul class="nav navbar-nav">_x000D_
          <li class="<?php if (isset($active_productos)){echo $active_productos;}?>"><a href="stock.php"><i class='glyphicon glyphicon-barcode'></i> Inventario</a></li>_x000D_
          <li class="<?php if (isset($active_categoria)){echo $active_categoria;}?>"><a href="categorias.php"><i class='glyphicon glyphicon-tags'></i> Categorías</a></li>_x000D_
          <li class="<?php if (isset($active_usuarios)){echo $active_usuarios;}?>"><a href="usuarios.php"><i  class='glyphicon glyphicon-user'></i> Usuarios</a></li>_x000D_
          <li class="<?php if (isset($active_prestamos)){echo $active_Prestamos;}?>"><a href="prestamos.php"><i class='glyphicon glyphicon-refresh'></i>Prestamos</a></li>_x000D_
          <li class="<?php if (isset($active_equipos)){echo $active_equipos;}?>"><a href="Asignacion de equipos.php"><i class='glyphicon glyphicon-phone'></i>Asignacion Equipos</a></li>_x000D_
        </ul>_x000D_
        <ul class="nav navbar-nav navbar-right">_x000D_
          <li class="<?php if (isset($active_equipos)){echo $active_equipos;}?>"><a href="Help desk.php">Help desk<i class='glyphicon glyphicon-question-sign'></i></a></li>_x000D_
          <li><a href="login.php?logout"><i class='glyphicon glyphicon-off'></i> Salir</a></li>_x000D_
        </ul>_x000D_
      </div>_x000D_
    </div>_x000D_
  </nav>_x000D_
  <?php_x000D_
		}_x000D_
	?>

_x000D_

_x000D_

_x000D_

solución

Tu error es que no estas usando muy bien los selectores, te dejo un link donde puedes aprender sobre selectores y como modificar bootstrap

Y continuando con tu pregunta solo cambie la forma la forma en que intentabas llegar al navbar, use esto nav.navbar para acceder a ella.

_x000D_

_x000D_

#footer{_x000D_
background-color:black;_x000D_
}_x000D_
_x000D_
nav.navbar {_x000D_
  background-color: #ae2822;_x000D_
}_x000D_
_x000D_
.navbar .navbar-brand {_x000D_
  color: #f9f7f7;_x000D_
}_x000D_
_x000D_
.navbar .navbar-brand:hover,_x000D_
.navbar .navbar-brand:focus {_x000D_
  color: #c91b1b;_x000D_
}_x000D_
_x000D_
.navbar .navbar-text {_x000D_
  color: #f9f7f7;_x000D_
}_x000D_
_x000D_
.navbar .navbar-nav .nav-link {_x000D_
  color: #f9f7f7;_x000D_
  border-radius: .25rem;_x000D_
  margin: 0 0.25em;_x000D_
}_x000D_
_x000D_
.navbar .navbar-nav .nav-link:not(.disabled):hover,_x000D_
.navbar .navbar-nav .nav-link:not(.disabled):focus {_x000D_
  color: #c91b1b;_x000D_
}_x000D_
_x000D_
.navbar .navbar-nav .nav-item.active .nav-link,_x000D_
.navbar .navbar-nav .nav-item.active .nav-link:hover,_x000D_
.navbar .navbar-nav .nav-item.active .nav-link:focus,_x000D_
.navbar .navbar-nav .nav-item.show .nav-link,_x000D_
.navbar .navbar-nav .nav-item.show .nav-link:hover,_x000D_
.navbar .navbar-nav .nav-item.show .nav-link:focus {_x000D_
  color: #c91b1b;_x000D_
  background-color: #f9f9f9;_x000D_
}_x000D_
_x000D_
.navbar .navbar-toggle {_x000D_
  border-color: #f9f9f9;_x000D_
}_x000D_
_x000D_
.navbar .navbar-toggle:hover,_x000D_
.navbar .navbar-toggle:focus {_x000D_
  background-color: #f9f9f9;_x000D_
}_x000D_
_x000D_
.navbar .navbar-toggle .navbar-toggler-icon {_x000D_
  color: #f9f7f7;_x000D_
}_x000D_
_x000D_
.navbar .navbar-collapse,_x000D_
.navbar .navbar-form {_x000D_
  border-color: #f9f7f7;_x000D_
}_x000D_
_x000D_
.navbar .navbar-link {_x000D_
  color: #f9f7f7;_x000D_
}_x000D_
_x000D_
.navbar .navbar-link:hover {_x000D_
  color: #c91b1b;_x000D_
}_x000D_
_x000D_
@media (max-width: 575px) {_x000D_
  .navbar-expand-sm .navbar-nav .show .dropdown-menu .dropdown- item {_x000D_
    color: #f9f7f7;_x000D_
  }_x000D_
  .navbar-expand-sm .navbar-nav .show .dropdown-menu .dropdown-item:hover,_x000D_
  .navbar-expand-sm .navbar-nav .show .dropdown-menu .dropdown- item:focus {_x000D_
    color: #c91b1b;_x000D_
  }_x000D_
  .navbar-expand-sm .navbar-nav .show .dropdown-menu .dropdown- item.active {_x000D_
    color: #c91b1b;_x000D_
    background-color: #f9f9f9;_x000D_
  }_x000D_
}_x000D_
_x000D_
@media (max-width: 767px) {_x000D_
  .navbar-expand-md .navbar-nav .show .dropdown-menu .dropdown- item {_x000D_
    color: #f9f7f7;_x000D_
  }_x000D_
  .navbar-expand-md .navbar-nav .show .dropdown-menu .dropdown- item:hover,_x000D_
  .navbar-expand-md .navbar-nav .show .dropdown-menu .dropdown- item:focus {_x000D_
    color: #c91b1b;_x000D_
  }_x000D_
  .navbar-expand-md .navbar-nav .show .dropdown-menu .dropdown- item.active {_x000D_
    color: #c91b1b;_x000D_
    background-color: #f9f9f9;_x000D_
  }_x000D_
}_x000D_
_x000D_
@media (max-width: 991px) {_x000D_
  .navbar-expand-lg .navbar-nav .show .dropdown-menu .dropdown- item {_x000D_
    color: #f9f7f7;_x000D_
  }_x000D_
  .navbar-expand-lg .navbar-nav .show .dropdown-menu .dropdown-item:hover,_x000D_
  .navbar-expand-lg .navbar-nav .show .dropdown-menu .dropdown- item:focus {_x000D_
    color: #c91b1b;_x000D_
  }_x000D_
  .navbar-expand-lg .navbar-nav .show .dropdown-menu .dropdown-item.active {_x000D_
    color: #c91b1b;_x000D_
    background-color: #f9f9f9;_x000D_
  }_x000D_
}_x000D_
_x000D_
@media (max-width: 1199px) {_x000D_
  .navbar-expand-xl .navbar-nav .show .dropdown-menu .dropdown- item {_x000D_
    color: #f9f7f7;_x000D_
  }_x000D_
  .navbar-expand-xl .navbar-nav .show .dropdown-menu .dropdown- item:hover,_x000D_
  .navbar-expand-xl .navbar-nav .show .dropdown-menu .dropdown- item:focus {_x000D_
    color: #c91b1b;_x000D_
  }_x000D_
  .navbar-expand-xl .navbar-nav .show .dropdown-menu .dropdown- item.active {_x000D_
    color: #c91b1b;_x000D_
    background-color: #f9f9f9;_x000D_
  }_x000D_
}_x000D_
_x000D_
.navbar-expand .navbar-nav .show .dropdown-menu .dropdown-item {_x000D_
  color: #f9f7f7;_x000D_
}_x000D_
_x000D_
.navbar-expand .navbar-nav .show .dropdown-menu .dropdown-item:hover,_x000D_
.navbar-expand .navbar-nav .show .dropdown-menu .dropdown-item:focus {_x000D_
  color: #c91b1b;_x000D_
}_x000D_
_x000D_
.navbar-expand .navbar-nav .show .dropdown-menu .dropdown-item.active {_x000D_
  color: #c91b1b;_x000D_
  background-color: #f9f9f9;_x000D_
}_x000D_
_x000D_
_x000D_
}_x000D_
.thumb-name {_x000D_
  font-weight: bold;_x000D_
  display: block;_x000D_
}_x000D_
.stock-counter {_x000D_
  opacity: 0.8;_x000D_
  position: absolute;_x000D_
  margin-top: 5px;_x000D_
  right: 21px;_x000D_
}_x000D_
.badge {_x000D_
  display: inline-block;_x000D_
  min-width: 10px;_x000D_
  padding: 3px 7px;_x000D_
  font-size: 12px;_x000D_
  font-weight: 700;_x000D_
  line-height: 1;_x000D_
  color: #fff;_x000D_
  text-align: center;_x000D_
  white-space: nowrap;_x000D_
  vertical-align: middle;_x000D_
  background-color: #777;_x000D_
  border-radius: 10px;_x000D_
}_x000D_
.low-stock-alert {_x000D_
  opacity: 0.8;_x000D_
  position: absolute;_x000D_
  margin-top: 5px;_x000D_
  left: 21px;_x000D_
  color: red;_x000D_
}_x000D_
.item-quantity {_x000D_
  font-size: 40px;_x000D_
}_x000D_
.current-stock {_x000D_
  font-size: 99px;_x000D_
  font-weight: bold;_x000D_
}_x000D_
.item-number {_x000D_
  font-size: 20px;_x000D_
}_x000D_
.item-title {_x000D_
  font-size: 23px;_x000D_
  font-weight: bold;_x000D_
}_x000D_
.item-price {_x000D_
  font-size: 23px;_x000D_
  font-weight: bold;_x000D_
  color: #388e3c;_x000D_
}_x000D_
.pagination>.active>a,_x000D_
.pagination>.active>a:focus,_x000D_
.pagination>.active>a:hover,_x000D_
.pagination>.active>span,_x000D_
.pagination>.active>span:focus,_x000D_
.pagination>.active>span:hover {_x000D_
  z-index: 3;_x000D_
  color: #fff;_x000D_
  cursor: default;_x000D_
  background-color: #3c763d;_x000D_
  border-color: #ccc;_x000D_
}_x000D_
a {_x000D_
  color: #3c763d;_x000D_
}

_x000D_

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>_x000D_
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>_x000D_
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />_x000D_
_x000D_
<nav class="navbar navbar-default ">_x000D_
  <div class="container-fluid">_x000D_
    <!-- Brand and toggle get grouped for better mobile display -->_x000D_
    <div class="navbar-header">_x000D_
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">_x000D_
        <span class="sr-only">Toggle navigation</span>_x000D_
        <span class="icon-bar"></span>_x000D_
        <span class="icon-bar"></span>_x000D_
        <span class="icon-bar"></span>_x000D_
      </button>_x000D_
      <a class="navbar-brand" href="#">Simple Stock</a>_x000D_
    </div>_x000D_
_x000D_
    <!-- Collect the nav links, forms, and other content for toggling -->_x000D_
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">_x000D_
      <ul class="nav navbar-nav">_x000D_
        <li class="<?php if (isset($active_productos)){echo $active_productos;}?>"><a href="stock.php"><i class='glyphicon glyphicon-barcode'></i> Inventario</a></li>_x000D_
        <li class="<?php if (isset($active_categoria)){echo $active_categoria;}?>"><a href="categorias.php"><i class='glyphicon glyphicon-tags'></i> Categorías</a></li>_x000D_
        <li class="<?php if (isset($active_usuarios)){echo $active_usuarios;}?>"><a href="usuarios.php"><i  class='glyphicon glyphicon-user'></i> Usuarios</a></li>_x000D_
      </ul>_x000D_
      <ul class="nav navbar-nav navbar-right">_x000D_
        <li><a href="http://obedalvarado.pw/contacto/" target='_blank'><i class='glyphicon glyphicon-envelope'></i> Soporte</a></li>_x000D_
        <li><a href="login.php?logout"><i class='glyphicon glyphicon-off'></i> Salir</a></li>_x000D_
      </ul>_x000D_
    </div>_x000D_
    <!-- /.navbar-collapse -->_x000D_
  </div>_x000D_
  <!-- /.container-fluid -->_x000D_
</nav>_x000D_
Editada: solo tienes que darle un id al footer, y _x000D_
despues darle el color que quieras: te dejo el ejemplo,_x000D_
 si te fijas llame id="footer" a el div y _x000D_
luego aplique css a ese id, _x000D_
#footer{background-color:black}_x000D_
_x000D_
<div class="navbar navbar-default navbar-fixed-bottom" id="footer">_x000D_
  <div class="container">_x000D_
    <p class="navbar-text pull-left">&copy_x000D_
      <?php echo date('Y');?> - Swisslub soluciones Integrales_x000D_
    </p>_x000D_
    <div class="navbar-text pull-right">_x000D_
      <?php  echo  $_SESSION['firstname'];?> &nbsp &nbsp &nbsp &nbsp &nbsp_x000D_
      <?php  echo  $_SESSION['user_permision'];?>_x000D_
_x000D_
    </div>_x000D_
  </div>_x000D_
  <div class="container">_x000D_
_x000D_
  </div>_x000D_
</div>_x000D_
_x000D_
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js">_x000D_
</script>_x000D_
_x000D_
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-_x000D_
   0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

_x000D_

_x000D_

_x000D_

Respondido por: Anonymous

Leave a Reply

Your email address will not be published.