Link to home
Start Free TrialLog in
Avatar of Robert Granlund
Robert GranlundFlag for United States of America

asked on

Drupal Menus

I'm building a site using Drupal.  I have a main navigation and a custom navigation.  My client wants the Custom navigation menu choice that is active to be another color.  Is there a Drupal Plugin or do I need to write a simple php script?  If it is a php script, can you give me an example of where to start?

Thank you in advance!
Avatar of bill30
bill30
Flag of United States of America image

To change a color of a menu you will need to do some CSS editing.

Find your CSS file for your theme and add

#customnavigationtitle a:active {
background color: #FFFFFF
}

Where FFFFFF is the new hexadecimal color code.

Let me know if you need further clarification.
Avatar of Robert Granlund

ASKER

bill30 thank you for your answer.  I did not explain it far enough though.  There are parent pages and sub-pages.  When a user is on a sub-page they want the Parent page to be active.  

How is that accomplished?
You could add some jquery to the site with some basic if/then statements.  If HTML page = ( page 1 or page 2) then CSS menuitem#1 = class active.

That is not proper coding whatsoever. but you get the idea.
ASKER CERTIFIED SOLUTION
Avatar of lordrt
lordrt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lordrt
lordrt

hope u managed to make it work