FORUMS: list search recent posts

How to add .active class to WordPress 3.0 CSS menus?

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Clint Milner
How to add .active class to WordPress 3.0 CSS menus?
on Oct 7, 2011 at 10:38:51 am

Hi All,

I'm developing a WP theme for my company and I'm looking for a little advice on for my navigation bar.

http://dev.cd-duplication-in-the-uk.com/disc-printing/screen/ is an example page...

The main nav menu is 100% CSS and ideally I'd like to give the user some notification to which page they're on.

For this example, I'd like to have "disc printing" as well as "screen" visible and colored blue.

Looking at the source, it seems like there are certain classes that are specific to these my two menu targets, but I can't get the CSS to activate.


nav.main li.current-menu-item,
nav.main li.current_page_item,
nav.main li.current_page_parent,
nav.main li.current-page-parent,
nav.main li.current_page_ancestor,
nav.main li.current-post-ancestor { color: #036; }


Once I get the blue to activate, I'd also like the sub-menu to stay visible as well... is there a trick to that?

Many thanks for you time,
Clint

Adobe CS4 Master Suite
Vista Ultimate 64 SP1
Intel Core i7 920 @ 3.60GHz
12 GB DDR3 RAM
NVidia Quadro FX 3700
Matrox RT.X2 LE Capture Card
4 TB RAID 5


Return to posts index

Clint Milner
Re: How to add .active class to WordPress 3.0 CSS menus?
on Oct 7, 2011 at 11:49:20 am

UPDATE:

I've been able to use this code:

ul.menu li.current-menu-parent a {color: #036;}
ul.sub-menu li.menu-item a {color: #999;}
ul.sub-menu li.current_page_item a {color: #036;}


It seemed to be a CSS precedence issue.

What I can't figure out how to do is to have the sub nav bar show when one of its sub-pages are active.

Can someone help me out with this one?

Thanks,
Clint

Adobe CS4 Master Suite
Vista Ultimate 64 SP1
Intel Core i7 920 @ 3.60GHz
12 GB DDR3 RAM
NVidia Quadro FX 3700
Matrox RT.X2 LE Capture Card
4 TB RAID 5


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]