Hi, I'm customizing a wordpress header for a client and I have a horizontal nav bar I need the active tab to be highlighted when that tab is active How do I do that?
I have it like that: #navmenu ul li a:active {color: #fff; background: #f00; } it doesn't work... The hover and regular a are responsive to changes but the active is not...
#navmenu ul li a.active {color: #fff; background: #f00; } /* here active is a class */ and in your html file <ul> <li><a href="" class="active">Home</li> </ul> will make your link Home active
Thanks, but I didn't fully understand... Just to clarify: this is wordpress, meaning the nav is defined in the header for all the pages and the page is in another "template" - like server side includes So I can't designate a class for the header items (nav items) on each page Another point - I do see the active color (red) when I click the nav item, but then it reverts to the "a" color I want that tab to stay highlighted so the visitor will know where he is
well here is a tutorial http://green-beast.com/blog/?p=157 http://jakebelfry.wordpress.com/2010/06/23/how-to-create-aactive-link-for-wordpress/
wow... that's a bit over my head I don't know PHP This is the code of the menu items in the header: <ul> <li class="page1tab"><a href="http://domain.com/blog4/about">About</a></li> <li class="page2tab"><a href="http://domain.com/blog4/projects/">Projects</a></li> <li class="page3tab"><a href="http://domain.com/blog4/portfolio">Portfolio</a></li> <li class="page4tab"><a href="http://domain.com/blog4/blog/">Blog</a></li> <li class="page5tab"><a href="http://domain.com/blog4/our-office/">Our Office</a></li> <li class="page6tab"><a href="http://domain.com/blog4/contact">Contact</a></li> </ul> can you (or some other nice guy) instruct me on how to do it?