Hello,

Cek this navigation bootstrap page:

http://www.innovation.web.id/bootstrap/5_5_6_navbar_inverted.html

I wonder how to change the color of the menu bar?

Is there any way to do that?

I try this. No color changes.

custom.css

.navbar-inverse { color: #655700; }

bootstrap-responsive.css

.navbar-inverse { color: #655700; }
  .navbar-inverse .nav-collapse .nav > li > a,
  .navbar-inverse .nav-collapse .dropdown-menu a {
    /* color: #999999; */
    color: #655700;
  }
  .navbar-inverse .nav-collapse .nav > li > a:hover,
  .navbar-inverse .nav-collapse .nav > li > a:focus,
  .navbar-inverse .nav-collapse .dropdown-menu a:hover,
  .navbar-inverse .nav-collapse .dropdown-menu a:focus {
    background-color: #655700;
  }

Change the background-image property of .navbar-inverse .navbar-inner

.navbar-inverse .navbar-inner{
background-image: linear-gradient(to bottom,#655700,#655700);
}

Hope this helps!

bootstrap.min.css, line 9: .navbar-inverse .navbar-inner is the one to change.

Or a quick fix would be to overwrite it with this:

.navbar-inverse .navbar-inner {
    background:#00ccff !important;
}

I try that. and still remains the same.

http://www.innovation.web.id/bootstrap/5_5_6_navbar_inverted.html

5_5_6_navbar_inverted.html

<!DOCTYPE html>
<html>
    <head>
        <title>Navigation Bar Inverted</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">        
        <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="css/bootstrap-responsive.css" rel="stylesheet">
        <link href="css/custom.css" rel="stylesheet">
    </head>

    <body>

            <div class="container" > 
            <div class="navbar navbar-inverse" style="position: static;">
              <div class="navbar-inner">
                <div class="container">
                  <a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-inverse-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                  </a>
                  <a class="brand" href="#">Title</a>
                  <div class="nav-collapse collapse navbar-inverse-collapse">
                    <ul class="nav">
                      <li class="active"><a href="#">Home</a></li>
                      <li class="active"><a href="#">About</a></li>
                      <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Portfolio<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                          <li><a href="#">Portfolio 1</a></li>
                          <li><a href="#">Portfolio 2</a></li>  
                        </ul>
                      </li>
                      <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Blog<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                          <li><a href="#">Blog 1</a></li>
                          <li><a href="#">Blog 2</a></li>
                        </ul>
                      </li>
                      <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Contact Us<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                          <li><a href="#">Contact Us1</a></li>
                          <li><a href="#">Contact Us2</a></li>
                        </ul>
                      </li>
                    </ul>

                  </div><!-- /.nav-collapse -->
                </div>
              </div><!-- /navbar-inner -->
            </div><!-- /navbar -->                    
          </div> 

      <script src="js/jquery.js"></script>
      <!-- Bootstrap javascript -->
      <script src="js/bootstrap.min.js"></script>
    </body>
</html>

custom.css

.navbar-inverse .nav-collapse .navbar-search {
    border-top-color: #8a1e1a;
    border-bottom-color: #8a1e1a;
}

.navbar-inverse { color: #655700; }

.navbar-inverse .navbar-inner{
    background-image: linear-gradient(to bottom,#655700,#655700);
}

.navbar-inverse .navbar-inner {
    background:#00ccff !important;
}

You put the two corrections at the same time. Wrong.

Try my suggestion separetly and then try mattster's.

One should work.

ok, I successfully change the color of the navigation bar.

What about changing the height of the navigation bar button?

How to do so?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.