title: selected css menu style change using css
body: <p>I have a css menu in my aspx page.I want the selected menu to have the same style as hover menu(change the color).I have the css for both hover and current selected menu,and hover is working fine. I have googled this problem and solution was to set "class= current" in the li section of the html code.But my doubt is whether I have to set "class=current" each li sections or is there any need of javascript to report which one is selected out of the menu. I am newbie to css.Please help me..</p>
  
  <pre><code> &lt;div id="tabsJ"&gt;
     &lt;ul class="menu"&gt;
     &lt;!-- CSS Tabs --&gt;
       &lt;li&gt;&lt;a href="DataLog.aspx"&gt;&lt;span&gt;Reports&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="EmployeeDetails.aspx"&gt;&lt;span&gt;Employee&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="EquipmentDetail.aspx"&gt;&lt;span&gt;Equipment&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="ScannerDetail.aspx"&gt;&lt;span&gt;Scanner&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
     &lt;/ul&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>I have used this css</p>
  
  <pre><code>#tabsJ {
    float:left;
    width:100%;
    background:#F4F4F4;
    font-size:93%;
    line-height:normal;
        border-bottom:1px solid #24618E;
    }
  #tabsJ ul {
      margin:0;
      padding:10px 10px 0 50px;
      list-style:none;
    }
  #tabsJ li {
    display:inline;
    margin:0;
    padding:0;
    }
  #tabsJ a {
    float:left;
    background: url("../images/tableftJ.gif") no-repeat left top;
    margin:0;
    padding:0 0 0 5px;
    text-decoration:none;
    }
  #tabsJ a span {
    float:left;
    display:block;
    background:url("../images/tabrightJ.gif") no-repeat right top;
    padding:5px 15px 4px 6px;
    color:#24618E;
    }
  /* Commented Backslash Hack hides rule from IE5-Mac \*/
  #tabsJ a span {float:none;}
  /* End IE5-Mac hack */
  #tabsJ a:hover span {
    color:#FFF;
    }
  #tabsJ a:hover {
    background-position:0% -42px;
    }
  #tabsJ a:hover span {
    background-position:100% -42px;
    }
  
      #tabsJ #current a {
              background-position:0% -42px;
      }
      #tabsJ #current a span {
              background-position:100% -42px;
              color:#FFF;
      }
  </code></pre>
  
  <p>Sam Warren - Added jsfiddle - <a href="http://jsfiddle.net/ejLTy/" rel="nofollow">http://jsfiddle.net/ejLTy/</a></p>
  
  <p>Actually I have this menubar in the masterpage for all the four pages,DataLog.aspx,EmployeeDetails.aspx,EquipmentDetail.aspx and ScannerDetail.aspx.</p>