title: Bootstrap 3 navbar active li not changing background-color
body: <p>I have added custom CSS for the active li element of navbar. But it seems to be picking the default color. Other colors such as navbar BG and text color seems to have changes properly.</p>
  
  <p>The modified CSS rules are as follows:</p>
  
  <pre><code>.navbar-default {
      background-color: #7b431a;
      border-color: #d65c14;
  }
  .navbar-default .navbar-brand {
      color: #ffffff;
  }
  .navbar-default .navbar-brand:hover,
  .navbar-default .navbar-brand:focus {
      color: #8a0e0b;
  }
  .navbar-default .navbar-nav &gt; li &gt; a {
      color: #ffffff;
  }
  .navbar-default .navbar-nav &gt; li &gt; a:hover,
  .navbar-default .navbar-nav &gt; li &gt; a:focus {
      color: #8a0e0b;
  }
  .navbar-default .navbar-nav &gt; .active &gt; a,
  .navbar-default .navbar-nav &gt; .active &gt; a:hover,
  .navbar-default .navbar-nav &gt; .active &gt; a:focus {
      color: #8a0e0b;
      background-color: #d65c14;
  }
  .navbar-default .navbar-nav &gt; .open &gt; a,
  .navbar-default .navbar-nav &gt; .open &gt; a:hover,
  .navbar-default .navbar-nav &gt; .open &gt; a:focus {
      color: #8a0e0b;
      background-color: #d65c14;
  }
  .navbar-default .navbar-nav &gt; .dropdown &gt; a .caret {
      border-top-color: #ffffff;
      border-bottom-color: #ffffff;
  }
  .navbar-default .navbar-nav &gt; .dropdown &gt; a:hover .caret,
  .navbar-default .navbar-nav &gt; .dropdown &gt; a:focus .caret {
      border-top-color: #8a0e0b;
      border-bottom-color: #8a0e0b;
  }
  .navbar-default .navbar-nav &gt; .open &gt; a .caret,
  .navbar-default .navbar-nav &gt; .open &gt; a:hover .caret,
  .navbar-default .navbar-nav &gt; .open &gt; a:focus .caret {
      border-top-color: #8a0e0b;
      border-bottom-color: #8a0e0b;
  }
  .navbar-default .navbar-toggle {
      border-color: #d65c14;
  }
  .navbar-default .navbar-toggle:hover,
  .navbar-default .navbar-toggle:focus {
      background-color: #d65c14;
  }
  .navbar-default .navbar-toggle .icon-bar {
      background-color: #ffffff;
  }
  </code></pre>
  
  <p>The HTML is:</p>
  
  <pre><code>&lt;nav class="navbar navbar-default navbar-fixed-top"&gt;
                  &lt;ul class="nav navbar-nav"&gt;
                      &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;Poducts&lt;/a&gt;&lt;/li&gt;
                      &lt;li class="active"&gt;&lt;a href="#"&gt;Gallery&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
  
              &lt;/nav&gt;
  </code></pre>
  
  <p>The output navbar is as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/eOJ2t.png" alt="Navbar image"></p>