Jump to content

how to apply a different css if one link is active or has a different id


bleustreak12

Recommended Posts

Sound's like you want to highlight the active page in the navigation. I don't think you should use javascript for that purpose. You might want to read the following topic.

http://www.phpfreaks.com/forums/index.php/topic,261426.0.html

not exactly the thing is i have two very different menus and what i am doing is that i show the second menu only when a certain menu item is selected in menu 1(and the second menu stays shows as long as no other menu item is selected in menu 1)  so it appears that(the menu 2) it is its sub menu.

 

now as long as the item in menu 1 is selected there is styling for that item  but once i click on the item in menu 2 the menu 1 item style dissapears as it is not the one that is active.

 

i hope i am clear i have two different menus and i want it to work as if there is one main menu and one sub menu

Ah now the bigger picture is getting more clear which wasn't clear in your original post. It is still vague what you mean by "selected". Do you mean when you hover over a main navigation item?

 

Do you have some code to show so far?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.