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)
-   -   Color of children of current page in menu (http://forum.bytesforall.com/showthread.php?t=911)

BradBrown Mar 22, 2009 02:38 PM

Color of children of current page in menu
 
This is a really fabulous theme. I was able to get the look I wanted very quickly and easily with almost no editing of the theme files. There were a few minor things I had to do manually, like putting an author avatar next to post headings, but nearly everything I wanted to do could be done through the theme settings.

I did find what appears to be a small bug in the page menu coloring. I fixed it, but I thought I'd pass the info along.

When the current page has child pages, the menu bar uses the hover color for the child pages as well as current page.

If that doesn't make sense, here's an example. Go to: http://www.bradbrownmagic.com/sandbox/?page_id=34 . Hover over the "Programs" menu item. All the child items are displayed using the hover color, green, when I would have expected them to be the "normal" color, blue. You can see the behavior I would expect in the live version of the site here: http://forhiskidsonline.org/programs/

Here's what I changed. In the header.php file, I updated the CSS for the current page menu items to use a child selector to ensure that only the current page's link gets the highlight applied.

Original Version:
Code:

ul.rMenu li.current_page_item a:link,
ul.rMenu li.current_page_item a:active,
ul.rMenu li.current_page_item a:hover,
ul.rMenu li.current_page_item a:visited,
ul.rMenu li a:hover

Corrected Version:
Code:

ul.rMenu li.current_page_item>a:link,
ul.rMenu li.current_page_item>a:active,
ul.rMenu li.current_page_item>a:hover,
ul.rMenu li.current_page_item>a:visited,
ul.rMenu li a:hover

The category bar would presumably have the same behavior, but I'm not using it in my site.

Thanks again for all your work in putting together and supporting this theme!

-Brad


All times are GMT -6. The time now is 05:18 PM.

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