Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Turn Off Highlighting for Menu Anchors when page is showing WordPress

  • SOLVED

Hello,

I'm making a website and am wondering how I can remove the highlighting from anchors that are in the main menu.

You can see it here: http://klantautomaat.com/clickablevideo/
You'll see the 2-3-4th item all link to anchors on the first page.

To make them work from another page I had to add /clickablevideo/ to the anchor, but that made it all highlight.

I'd like to have them in the menu but only highlight on hover.

Any Ideas?

Thanks,
Matthias.

Update:
I've added following lines to the bottom of the css and removed the line that made "nav#main_menu > ul > li.active > a" > color:white.

/* Changing Red Background to white except for when hovered */
nav#main_menu > ul > li.active > a
{background-color:#fff;}
nav#main_menu > ul > li > a:hover, nav#main_menu > ul > li:hover > a {
background-color:#CD2122!important;
}


So currently everything is blue except when hovered over, which looks better than before at least.
However it would be better if Home / Blog / Contact would stay red when active if possible.

Answers (3)

2013-05-16

Francisco Javier Carazo Gil answers:

You have different CSS clases in your menu items, the ones which are not highlighted need those classes: current_page_item active


Francisco Javier Carazo Gil comments:

Better than add classes, change the current ones:

Options.css 272:

nav#main_menu > ul > li.active > a, nav#main_menu > ul > li > a:hover, nav#main_menu > ul > li:hover > a {
color:
white;
}

Change for this:

nav#main_menu > ul > li > a, nav#main_menu > ul > li > a:hover, nav#main_menu > ul > li:hover > a {
color:
white;
}


Francisco Javier Carazo Gil comments:

And in line 71, change this:

nav#main_menu > ul > li.active > a,

For this other:

nav#main_menu > ul > li > a,


matthias comments:

Hi,

Thanks. I attached the image as a result when i try to change line 71.
Changing the .active in line 272 simply makes Blog and Contact white (and thus disappears on the white background).

M.