Ready to get started?Download WordPress


[resolved] Selected menu item (6 posts)

  1. NCRoma
    Posted 10 months ago #

    Newbie question incoming:

    I wish to find the css anotation for the main navigation menu selected item, so I can put in some color on the text. Any tips of where it is in the style.css?

    Many thanks!

  2. haltas
    Posted 10 months ago #

    In your style.css change these:

    .main-navigation li a:hover {
    	color: #yourcolor;

    for the main navigation on mouse over

    .main-navigation li ul li a:hover {
    	background: #444;
    	color: #yourcolor;

    for the drop down-menu on mouse over

    .main-navigation .current-menu-item > a,
    .main-navigation .current-menu-ancestor > a,
    .main-navigation .current_page_item > a,
    .main-navigation .current_page_ancestor > a {
    	color: #yourcolor;
    	font-weight: bold;

    for the current page or category

    If you want to have the current sub-category also to be highlighted with a custom color,
    also change this:

    .main-navigation .sub-menu .current-menu-item > a,
    .main-navigation .sub-menu .current-menu-ancestor > a,
    .main-navigation .sub-menu .current_page_item > a,
    .main-navigation .sub-menu .current_page_ancestor > a {
    	color: #yourcolor;

    replace 'yourcolor' with the color of your choice. Should work :) Let me know

  3. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    No! Do not edit the theme itself. First create a child theme for your changes. Or install a custom CSS plugin.

  4. haltas
    Posted 10 months ago #

    For the hex color code, I think it´s the best to use the accent color of your website, which is defined in Leaf Options.

  5. NCRoma
    Posted 10 months ago #

    Resolved! Sadly I am far too into this to go and start all over again in a child theme :( But next time I'll know that is the right thing to do! Thanks!

  6. kristygardner
    Posted 9 months ago #

    very helpful!!! thank you!


You must log in to post.

About this Theme

About this Topic