Jump to content

How do I keep the clicked tab remain active(colored)


sayed2x2

Recommended Posts

Hi, I created a drop-drown menu which is working fine however I m not able to add one effect.When a visitor click on a tab, I want that tab to remain active(colored), so that they may know , on which page they are.For instance like in this site: http://geekyminds.com/ Thanks in advance. Here is the code -------------------------------------------------------------------------------------------------------------------------------------------------- <!DOCTYPE html><html><head><style>.nav ul {list-style:none;margin:0px;padding:0px;}.nav li {float:left;width:100px;background-color:#003;height:32px;position:relative;top:10px;left:0px;text-align:center;border-right:1px solid white;border-top:1px solid white;line-height:32px;}.nav li ul li{float:none;text-align:left;padding-left:5px;background: rgb(0, 0, 0);background: rgba(0, 0, 0, 0.1);}.nav li ul li a{color:#000;}.nav li ul{visibility:hidden;position:absolute;top:22px;left:0px;}.nav ul a{text-decoration:none;color:#FFF;}.nav ul li:hover{background-color:#A72940;}.nav li:hover ul{visibility:visible;}.nav li ul li ul{margin-left:-106px;}</style><body><div class="nav"><ul><li><a href="#">Home</a></li><li><a href="#">About Us</a></li><li><a href="#">Products</a><ul><li><a href="#">Product 1</a><ul><li>Sub Items 1</li><li>Sub Item 2</li><li>Sub Item 2</li></ul></li><li><a href="#">Product 2</a></li><li><a href="#">Product 3</a></li></ul></li><li><a href="#">Contact Us</a></li></ul></div></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...