newcoder1010 Posted January 17, 2017 Share Posted January 17, 2017 (edited) Hi, HTML: <ul class="menu nav"> <li class="first leaf "><a href="xxx.com/maryland">Maryland</a></li> <li class="leaf child-menu-item"><a href="xxxx.com/bal">Baltimore, MD</a></li> <li class="leaf child-menu-item"><a href="xxx.com/mont" class="child-menu-item">Montgomery County, MD</a></li> </ul> I have this css works for hover: .nav > li > a:hover {background:red;} I also like to have the same background color when I visit each page. Below code does not work. .nav > li > a:active{background:red;} Please advise. Edited January 17, 2017 by newcoder1010 Link to comment Share on other sites More sharing options...
newcoder1010 Posted January 17, 2017 Author Share Posted January 17, 2017 (edited) fyi Edited January 17, 2017 by newcoder1010 Link to comment Share on other sites More sharing options...
newcoder1010 Posted January 18, 2017 Author Share Posted January 18, 2017 I fixed it. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now