![]() |
It's close, and thanks JD for the inclusion of the UL, I was stuck looking at the class. Here's my code:
HTML Code:
ul.rMenu li.current-menu-parent ul li a:link So it should be: Link & visited: Blue Active: White Hover: Red Am I just not seeing a typo here? |
FireBug shows me you need
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 { |
This continues to frustrate me. I've got it now where it has:
CORRECT: Parent item (white on current) Inactive child links (blue) Hover child links (red) INCORRECT: Active child page -- blue, should be white I went to Firebug instead of Chrome Element. They're formatted a little differently, so they could be displaying the same info. In any case, I searched for the blue code #204572. This is what I see: HTML Code:
ul.rMenu li.current-menu-parent ul li a:active { Makes sense to me from the way CSS is structured, but is there a way to get the Active Child page to show up as a different color from the links/visited links/hover? |
Anyone? Or should I wave the white flag on this?
|
The brute force way would be to add the following in CSS Inserts.
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 { |
Close but no cigar. This creates a white hover state instead of the red. I tried removing the hover elements and that just created the scenario I previously described.
I think I'm giving up on this one. Any recommendations on a CSS-friendly menu plugin? Re: color scheme...it's what the site owner wanted. I originally designed it as a light gray but he wanted the blue to go with the logo. Sometimes you can explain and explain but they're hell-bent on their decisions! ;) |
Did you try taking out the hover code? You may have to play with this code a bit.
|
Yeah, I tried removing the hover elements. Tried also overriding them with different placement in the inserts, and a few other variations but it ultimately reproduced the same effects that I got before.
I'll try going the other route with a plugin, so recommendations are welcome. |
This worked for me
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: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:visited { |
I tried it I think the issue here stems from the use of the Parent code (earlier in the thread):
HTML Code:
/* ================================================ */ If, however, I remove the parent code, then everything fits into place EXCEPT the parent item. For example, the active child is white, the other child links are blue, the hover links are red. It's essentially the CSS default. My original configuration had the Parent code (above) and the following three items that I have currently removed: 1) Blue colors on links: ul.rMenu li.current-menu-parent ul li a:link, ul.rMenu li.current-menu-parent ul li a:visited {color: #204572 !important;} 2) White on active link (NOT WORKING) ul.rMenu li.current-menu-parent ul li a:active {color: #fff;} 3) Red on hover: ul.rMenu li.current-menu-parent ul li a:hover {color: #DC2509 !important;} The final variation I tried was the Parent code + your code except I altered the parent code to get rid of the link, hover, and visited states. This failed to activate the Parent as white. |
So maybe instead of the code I just gave you perhaps the following.
HTML Code:
div#menu1 ul.rMenu li.current_page_item a { |
THAT DID IT!!!
Or, more specifically, this combination of code: 1) Parent menu code: HTML Code:
ul.rMenu li.current-menu-parent a:link, HTML Code:
ul.rMenu li.current-menu-parent ul li a:link, ul.rMenu li.current-menu-parent ul li a:visited HTML Code:
div#menu1 ul.rMenu li.current_page_item a { |
I used the code above to highlight the parent menu when on a child page, and it worked except when I try to make the background gradient. The text still changes but not the background. This is the CSS i used in the CSS Insert section.
HTML Code:
/* how to highlight parent of current page * * * * **/ Any suggestions? |
I would double check your gradient CSS. That can be a bit finicky. For instance I have never seen from and to in CSS. Where did you get this code?
|
Thanks for your quick response. I found it on this site http://webdesignerwall.com/tutorials...r-css-gradient. The strange thing is that the code works in default stage but not in current stage.
|
I would double check your selectors. How about this one?
.current_page_item a |
Tried to change the selector to your suggestion, but it did not work either. When I did that not even the text changed. So I guess the selector is correct since it at least changes the text. This is the site I am working on. This is one of the child pages http://frontline-leadership.com/wordpress/?page_id=122. I really appreciate all your help.
|
Try changing
HTML Code:
/* ================================================ */ HTML Code:
/* ================================================ */ |
Tried that Juggledad, but again then the white text disappears as well. So it looks like the selector does not work when I do that. The strange thing is that the gradient works for the default stage but not for the current page.
|
Without spending a bit of time to narrow this down you could "brute force" the color for the current menu item by using the following and changing the color to what you want for current and hover states.
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 { |
lmilesw it worked so far as that the current page has the right darker gradient background I want in the menu, but not when I am on the child page. Before the background did not work for childpages in the menu, but the text. Now it does not indicate in the menu at all what the prarent is. Any idea?
|
I got it to work. When I added div#menu1 ul.rMenu li.current_page_parent a:visited, to the code you gave me and it worked.
|
All times are GMT -6. The time now is 05:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.