• Resolved LachlanF

    (@lachlanf)


    Hey guys,

    So I’ve built a site using a modified version of the twenty ten theme, and I’ve primarily kept it for the ease of the navigation menu. I’ve set up the site so the top level of the menu goes to various pages and the submenu items go to in page anchors within each section. When you’re in a given page the top level menu item is a different color, which was easy enough, but I’m also wondering if I can keep the submenu for the page being visited constantly open for ease of navigation? I haven’t worked it out yet, but I’m guessing there is a way…

    Cheers, Lachlan

Viewing 4 replies - 1 through 4 (of 4 total)
  • You’d have to edit the theme’s stylesheet and rewrite the CSS for the .current-page-item children.

    Thread Starter LachlanF

    (@lachlanf)

    Yeah seems fair. Which one of these two style blocks needs editing?

    #access ul li.current_page_item > a,
    #access ul li.current-menu-ancestor > a,
    #access ul li.current-menu-item > a,
    #access ul li.current-menu-parent > a {
    color: #000;
    background:#FFF;
    }
    * html #access ul li.current_page_item a,
    * html #access ul li.current-menu-ancestor a,
    * html #access ul li.current-menu-item a,
    * html #access ul li.current-menu-parent a,
    * html #access ul li a:hover {
    color:#000;
    background:#FFF;
    }

    And what do I need to add? I tried putting in display:block with no success…

    You don’t want to edit CSS – you want to add it. Specifically you need to overwrite display:none; for #access ul ul. Off the top of my head, something like:

    #access ul .current_page_item > ul {display:block;}

    might work.

    Thread Starter LachlanF

    (@lachlanf)

    Cheers mate, had to modify it slightly to whats below, but then it worked like a treat!

    #access ul li.current_page_item > ul {display:block;}

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Keeping twenty ten menu expanded’ is closed to new replies.