Assign Active Link in Top Nav

Permalink
Hi everyone,

Does anyone have a successful method to change the link in the nav bar according to the page you are currently on?

For example - About Us link in the top nav would be red when you're on that page while all others stay white.

Is there a way to do this with the auto-nav feature in C5?

Thanks!

Suzy

suzykaploozie
 
Mnkras replied on at Permalink Best Answer Reply
Mnkras
its already there, it applies the class nav-selected
suzykaploozie replied on at Permalink Reply
suzykaploozie
Thanks Mnkras. I'll use that going forward.. guess I missed that.

S
nige replied on at Permalink Reply
nige
Er thats great but I need to do this too and I dont understand –

"it's already there" it's already where??

Is it an attribute? If so how do I apply nav-selected?

Nige
andrew replied on at Permalink Reply
andrew
The Auto-Nav (and now the superfish menu, if you're using that add-on) already applies the "nav-selected" class to the nav item when you're on that page, or within that page's section on the site. It's added to the LI tag that wraps the A tag for that page. So to style it you'd do something like

li.nav-selected a {font-weight: bold;}


Just add that to your theme's style sheet. Then the active page will be bold in that nav.