Click here to Skip to main content
13,358,478 members (53,756 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello Friends,

I have created a website in

i have designed a menu for it...such as Home, AboutUs, Services , Our mission, Contact us.

So when i click this menu...Suppose if i click services. the back ground color should change on mouse over and the color should stay on that that the user thinks that he is viewing services page.

Please help thanks

This is my Menu Css

.green #slatenav


/*text-transform:uppercase; */


.green #slatenav ul{margin:0px;padding:0;list-style-type:none;width:auto; }
.green #slatenav ul li{display:block;float:left;margin:0 1px 10px 8px;}
.green #slatenav ul li a{display:block;float:left;color:#197E46;text-decoration:none;padding:14px 10px 0 10px;height:28px;


.green #slatenav ul li a:hover,.green #slatenav ul li a.current
{color:#fff;background:transparent url(images/greenslate_backgroundOVER.gif) no-repeat top center;}

<div class="green">
    <div id="slatenav">

            <li><a href="Home.aspx"><span>Home</span></a></li>
            <li><a href="AboutUs.aspx"><span>About Us</span></a></li>
            <li><a href="Services.aspx"><span>Services</span></a></li>
           <li><a href="OurMission.aspx><span>Our Mission</span></a></li>
           <li><a href="ContactUs.aspx"><span>Contact Us</span></a></li>


Please help thanks.....The bg color should stay on that menu when the user clicks on the menu.
Posted 25-Dec-12 1:58am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I assume that you want to retain the menu color after click. Have a look at following link from ASP.Net forum. Same issue has been addressed:[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180111.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100