Click here to Skip to main content
14,930,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to change the color of the background navbar in bootstrap but only inverse and navbar-defualt and I'd go blue background. How does it work?
Posted

I have attached an example and used it, but no action was taken !!!!
 <nav role="navigation" class="navbar navbar-fixed-top navbar-custom ">
</nav>

CSS
/*Start My Custom Nav*/

.navbar-custom {
  background-color: #0026ff;
  border-color: #e7e7e7;
}
.navbar-custom .navbar-brand {
  color: #ec971f;
}
.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus {
  color: #5e5e5e;
  background-color: transparent;
}
.navbar-custom .navbar-text {
  color: #777;
}
.navbar-custom .navbar-nav > li > a {
  color: #777;
}
.navbar-custom .navbar-nav > li > a:hover,
.navbar-custom .navbar-nav > li > a:focus {
  color: #333;
  background-color: transparent;
}
.navbar-custom .navbar-nav > .active > a,
.navbar-custom .navbar-nav > .active > a:hover,
.navbar-custom .navbar-nav > .active > a:focus {
  color: #555;
  background-color: #0a31b1;
}
.navbar-custom .navbar-nav > .disabled > a,
.navbar-custom .navbar-nav > .disabled > a:hover,
.navbar-custom .navbar-nav > .disabled > a:focus {
  color: #ccc;
  background-color: transparent;
}
.navbar-custom .navbar-toggle {
  border-color: #ddd;
}
.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus {
  background-color: #ddd;
}
.navbar-custom .navbar-toggle .icon-bar {
  background-color: #0a31b1;
}
.navbar-custom .navbar-collapse,
.navbar-custom .navbar-form {
  border-color: #0a31b1;
}
.navbar-custom .navbar-nav > .open > a,
.navbar-custom .navbar-nav > .open > a:hover,
.navbar-custom .navbar-nav > .open > a:focus {
  color: #555;
  background-color: #0a31b1;
}
@media (max-width: 767px) {
  .navbar-custom .navbar-nav .open .dropdown-menu > li > a {
    color: #777;
  }
  .navbar-custom .navbar-nav .open .dropdown-menu > li > a:hover,
  .navbar-custom .navbar-nav .open .dropdown-menu > li > a:focus {
    color: #333;
    background-color: transparent;
  }
  .navbar-custom .navbar-nav .open .dropdown-menu > .active > a,
  .navbar-custom .navbar-nav .open .dropdown-menu > .active > a:hover,
  .navbar-custom .navbar-nav .open .dropdown-menu > .active > a:focus {
    color: #555;
    background-color: #0a31b1;
  }
  .navbar-custom .navbar-nav .open .dropdown-menu > .disabled > a,
  .navbar-custom .navbar-nav .open .dropdown-menu > .disabled > a:hover,
  .navbar-custom .navbar-nav .open .dropdown-menu > .disabled > a:focus {
    color: #ccc;
    background-color: transparent;
  }
}
.navbar-custom .navbar-link {
  color: #777;
}
.navbar-custom .navbar-link:hover {
  color: #333;
}
.navbar-custom .btn-link {
  color: #777;
}
.navbar-custom .btn-link:hover,
.navbar-custom .btn-link:focus {
  color: #333;
}
.navbar-custom .btn-link[disabled]:hover,
fieldset[disabled] .navbar-custom .btn-link:hover,
.navbar-custom .btn-link[disabled]:focus,
fieldset[disabled] .navbar-custom .btn-link:focus {
  color: #ccc;
}
/*End My Custom Navbar*/
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900