title: How to change background color for active tab in Bootstrap 3 navigation bar?
body: <p>I have navigation bar with few items. Each tab has class active assigned if it's currently selected. If that has class  active I would like to set background color to that tab. Here is example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div.admin-box {
   background-color: #E0E0E0;
  }
  
  .active a {
    background-color: #E0E0E0 !important;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script language="javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
  &lt;ul class="nav nav-tabs"&gt;
      &lt;li class="active"&gt;&lt;a data-toggle="tab" href="#tab-1"&gt;Tab 1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a data-toggle="tab" href="#tab-2"&gt;Tab 2&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a data-toggle="tab" href="#tab-3"&gt;Tab 3&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a data-toggle="tab" href="#tab-4"&gt;Tab 4&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;div class="tab-content"&gt;
      &lt;!-- Tab 1 --&gt;
      &lt;div id="tab-1" class="tab-pane fade in active admin-box"&gt;
        Tab 1 content.
      &lt;/div&gt;
      &lt;!-- Tab 2 --&gt;
      &lt;div id="tab-2" class="tab-pane fade admin-box"&gt;
        Tab 2 content
      &lt;/div&gt;
      &lt;!-- Tab 3 --&gt;
      &lt;div id="tab-3" class="tab-pane fade admin-box"&gt;
        Tab 3 content.
      &lt;/div&gt;
      &lt;!-- Tab 4 --&gt;
      &lt;div id="tab-4" class="tab-pane fade admin-box"&gt;
        Tab 4 content.
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>As you can see each tab container has background color. So selected tab should have the same background color to match containers background. Is there a way to achieve that with pure CSS or JS has to be involved as well? If anyone knows easy way to do this please let me know. </p>