title: Why is my nav ul li:active background color not working?
body: <p>In my navigation I want to be able to and click on a navigation link and have the li item change color when you go the page. Eg. I click on the about us tab in the navigation, it goes to the about us page and the about us page tab in the navigation bar has changed color. I tried nav ul li:active but it is not working.</p>
  
  <p>Here is the css:</p>
  
  <pre><code>#nav {
  
      display: block;
  
      position:relative;
  
      border: 1px solid #002799;
  
      background: linear-gradient(to bottom, #4970E3 0%, #121B3E 100%) repeat scroll 0% 0% transparent;
  
      background: -moz-linear-gradient(to bottom, #4970E3 0%, #121B3E 100%) repeat scroll 0% 0% transparent;
  
      background: -webkit-linear-gradient(to bottom, #4970E3 0%, #121B3E 100%) repeat scroll 0% 0% transparent;
  
      padding: 0px 0px 0px 0px;
  
      border-radius: 15px;
  
      height: 40px;
  
      width: 470px;
  
      margin: 0px auto;
  
      font: Bold 16px Verdana;
  
  
  }
  
  #nav ul {
  
      margin: 0px;
  
      padding: 0px;
  
      min-width:250%;
  
  
  }
  
  
  #nav li {
  
      list-style: none;
  
      float: left;
  
      position: relative;
  
      display:inline;
  
      width:auto;
  }
  
  
  
  
  #nav ul li {
  
      list-style: none;
  
      float: left;
  
      position: relative;
  
  }
  
  #nav ul li:last-child a {
  
      border:none;
  
  }
  
  #nav ul li:hover {
  
      background: #060652;
  
  }
  
  #nav ul li:active {
  
      background: #060652;
  
  }
  
  #nav ul li:hover ul {
  
      display:block;
  
      width:100%;
  }
  
  #nav ul ul {
  
      display: none;
  
      position:absolute;
  
      left:0px;
  
      min-width:250%;
  
      z-index: 999;
  
      background-color: #4970E3;
  
  }
  
  #nav ul ul li {
  
      border: 1px solid #FFFFFF;
  
      display:block;
  
      float: none;
  
  
      z-index: 999;
  
      width: auto;
  
  }
  
  #nav ul ul li a {
  
      border-right: none;
  
      font: Bold 16px Verdana;
  
      width: auto;
  
  }
  
  #nav ul li a {
  
      text-decoration: none;
  
      display: block;
  
      border-right: 1px solid #121B3E;
  
      padding: 10px 15px;
  
      color: #fbfbfb !important; 
  }
  </code></pre>
  
  <p>Here is the html:</p>
  
  <pre><code>&lt;div id="nav"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/"&gt;Home&lt;/a&gt;
  &lt;/li&gt;
  
  &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=12"&gt;About Us&lt;/a&gt;
  &lt;ul&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=19"&gt;Why OSTech&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=21"&gt;Testimonials&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=23 "&gt;Case Study 1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=25"&gt;Case Study 2&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=27"&gt;Green IT&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=29"&gt;OSdesk Intel vPro&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=31"&gt;Workstation Innovation&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=33"&gt;Consolidation and Centralisation&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=35"&gt;The Green Grid&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=37"&gt;Clean Technologies&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=39"&gt;OSdesk Remote Management&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a&gt;What We Do&lt;/a&gt;
  &lt;ul&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=41"&gt;OSdesk&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=43"&gt;OSguard&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=45"&gt;OSmon&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=47"&gt;OSvault &amp; OSclass&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=49"&gt;OSmail &amp; OShost &amp; OSshare&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=52"&gt;OStrack &amp; OSdms&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=54"&gt;OSarchive &amp; OSgroup&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=62"&gt;OSfaq &amp; OShelp&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=56"&gt;OSbill &amp; OScal&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href="http://osweb01.ostech.com.au/?page_id=16"&gt;Contact Us&lt;/a&gt;&lt;ul&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>