how to highligh a menu in generous theme?
-
Hello sirs
I want to know how can highlight a menu in generous theme?The idea is when I go t a post inside a menu category,
that using highlight I can identify where I am.Regards
Ley
-
Hey there,
You didn’t really say how you want it highlighting, so I guess you want to highlight the anchor maybe?
If so then you can use this:
#menu-container .current_page_item a{color:#FFFF00 ;}That will make the text on the active menu as yellow. You can change the hex code (#FFFF00) to a colour you desire. This should help:
Hope this helps.
Have a great day.
Hi Timothy
Thanks for your answer, I have some troubles because
I didnt find this menu, in the generous theme there
are several, I put them below, can you let me know
which one can I need to change please?
Sorry for my ignorance
Regards
Ley#menu-container {
background-color: #3E0202;
background-image: url(“images/menu.png”);
}#menu-container #menu {
width: 100%;
background-repeat: repeat;
overflow: visible;
}
#menu-container ul {
margin: 0;
padding: 0;
list-style: none;
overflow: visible;
}#menu-container li {
margin: 0;
padding: 0;
float: left;
}#menu-container a {
overflow: visible;
border-right: 1px solid #fff;
padding: 10px 20px 10px 20px;
display: block;
background-image: url(“images/menu.png”);
background-repeat: repeat;
line-height: 1.5;
font-size: 13px;
font-family:Verdana, Geneva, sans-serif;
text-decoration: none;
color: #fff;
text-align: center;
}#menu-container a:hover {
background-image: none;
background-color: #3e0202;
line-height: 1.5;
font-size: 13px;
font-family:Verdana, Geneva, sans-serif;
text-decoration: none;
color: #fff;
}Hey there.
The CSS I gave targets the class “.current_page_item”, which is there when you’re on that element when on that page. If there is nothing in the CSS then it seems there is nothing special for when you’re on a active page.
You’d need to add this extra. You can do that either in a child theme:
http://codex.wordpress.org/Child_Themes
http://premium.wpmudev.org/blog/create-wordpress-child-theme/Or you could use a simply plugin like:
http://wordpress.org/plugins/custom-css-manager-plugin/screenshots/
http://wordpress.org/plugins/my-custom-css/screenshots/
http://wordpress.org/plugins/pc-custom-css/
http://wordpress.org/plugins/imporved-simpler-css/screenshots/
Hope this helps.
Hi Timothy
Thanks again
I just installed the plugin Custom CSS Manager
and added the line you sent to me
#menu-container .current_page_item a{color:#FFFF00 ;}
But this only worked in the first category of my menu.Can you let me know how can do that in order that when
I will go to other category and go to any post inside
this show me that category highlighted?Regards
LeyHey there.
Providing it’s the current page then one of these could be helpful:
current-menu-item
current_page_item
current-menu-ancestor
current_page_parent
current_page_ancestor
current-menu-ancestor
current_page_ancestorIf you could please provide a direct link to the pages you want this to work on, and where in the menu they appear I should be able to see better. I don’t personally use this theme so used the demo site on WP to see. 🙂
Cheers.
Hello Timothy
This is the site please
http://cuidadordemencia.com/Do you need anything else?
Regards
LeyHey again.
I think I see what you mean 🙂
Try:
#menu-container .current-menu-item a{color:#FFFF00 ;}Rather than targeting a current page that should target any current menu item.
Take care.
Hi Timothy
I have done the combination with
current-menu-parent
and appears that it is working
Regards
LeyBut other question
are there any way to see it highlighted also when I
will go to the menu?Many thanks for your support
Regards
LeyHow do you mean?
Like a hover effect?
So when you hover over it then a highlight shows.
Not sure I understand that part, sorry.
Let me know.
The topic ‘how to highligh a menu in generous theme?’ is closed to new replies.
