Click here to Skip to main content
11,805,604 members (52,921 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET menu
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 0: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
0 OriginalGriff 310
1 Richard Deeming 225
2 Sergey Alexandrovich Kryukov 170
3 Abhinav S 128
4 ppolymorphe 125
0 OriginalGriff 3,300
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2015
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