We help IT Professionals succeed at work.

WordPress navigation menus: how to change color when clicked

Tina Walt
Tina Walt asked
on
196 Views
Last Modified: 2017-04-21
Now that Pankaj Jangir solved my problem with not having menus show up at all, I need the next step:
When one of the menus is clicked, I need it to change color (such as the red mouseover color) and then when you are on that particular page that was selected, the color of the menu stays that color until you go back to the "Main" page again and it resets. I hope I am clear here:
Eg. I am on the Main page. I select the blue "Services" menu at the top. Once I click it and am directed to the Services page the Services menu color changes to Red and stays Red at the top until I go back to the Main page and it resets itself again.

Thank you,
Tina
Comment
Watch Question

Banshi lal dangiFull Stack Developer

Commented:
Please share the URL where you are facing the issue.
Full Stack Developer
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Top Expert 2012

Commented:
Dear @Tina Walt I have solved your problem yesterday and this problem also, before Pankaj Jangir has ever posted what yesterday. You should only read what experts write.

Author

Commented:
Your solution did not work
Francesco ColucciHtml,Css,Wordpress Expert

Commented:
Please share the website Tina.
Banshi lal dangiFull Stack Developer

Commented:
@Tina Try by adding the CSS code which I posted in above comment.
Add that code in  your CSS file.
Francesco ColucciHtml,Css,Wordpress Expert

Commented:
Add this to your custom css code :

#mainnav ul li a:active {
    color: #d65050;
}

Let me know

Best regards

Francesco

Author

Commented:
Francesco, your code did not do anything. Sorry.

Author

Commented:
Your solution worked beautifully!

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.