Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   [SOLVED] Is it possible to remove menu highlighting on home page? (http://forum.bytesforall.com/showthread.php?t=17938)

rogemj23 Jul 6, 2012 10:02 PM

[SOLVED] Is it possible to remove menu highlighting on home page?
 
I'm trying to figure out a way to remove the highlight on the home page only so that when you land on the site none of the links are highlighted. I've scoured the forums, but haven't found any solutions. I think it has something to do with this line of code: li class="page_item current_page_item", but I don't want to change it for every instance, just for the home page. Any ideas? Thanks!

Atathualpa 3.7.7
WordPress 3.4.1

juggledad Jul 7, 2012 03:45 AM

it does have to do with that, you just need to use a CSS selector of
HTML Code:

body.home .current_page_item {...}

rogemj23 Jul 9, 2012 09:26 AM

Thank you for the code, but unfortunately it didn't work. I added the following to CSS Inserts:

body.home current_page_item {
background-color: #B24467;
}

It did not seem to change anything. The website is http://www.andrearussell.com/new_site/.
Any other suggestions?

Thanks!

juggledad Jul 9, 2012 09:51 AM

the CSS wasn't specific enough. You should learn to use the FireBug extension of FireFox. With it I see that this is the CSS being sed
HTML Code:

div#menu1 ul.rMenu li.current-menu-item a:link,
div#menu1 ul.rMenu li.current-menu-item a:active,
div#menu1 ul.rMenu li.current-menu-item a:hover,
div#menu1 ul.rMenu li.current-menu-item a:visited,
div#menu1 ul.rMenu li.current_page_item a:link,
div#menu1 ul.rMenu li.current_page_item a:active,
div#menu1 ul.rMenu li.current_page_item a:hover,
div#menu1 ul.rMenu li.current_page_item a:visited,
div#menu1 ul.rMenu li a:hover {
    background-color: #B24467;
    color: #F8F4EB;
}

add teh 'body.home' before each of those selectors...and change the color

rogemj23 Jul 9, 2012 10:04 AM

Yes, that does remove the highlighting from the homepage, but from every other page as well. Is there a way to isolate this to just the home page? I tried adding body.home before each of them, but that didn't work.

I do use firebug, and I do see where you got that code from now. I hadn't scrolled down far enough before to see it.

juggledad Jul 9, 2012 12:51 PM

please put it in and prefix them all with the 'body.home 'so they are
HTML Code:

body.home div#menu1 ul.rMenu li.current-menu-item a:link,
so I can see the results

rogemj23 Jul 9, 2012 01:27 PM

OK, I put them in. Thanks!


All times are GMT -6. The time now is 11:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.