WordPress.org

Ready to get started?Download WordPress

Forums

Horizontal NavBar with Hovering Sub-Pages (4 posts)

  1. JRiley21
    Member
    Posted 3 years ago #

    Hi. :)

    I'd imagine this will be a pretty simple trick for some of you.

    Basically, I want a horizontal navbar that displays my pages, and upon hovering over a certain menu item, the subpages are displayed directly below.

    Right now, I've got every part fully working except for the sub-page display. Can someone help? Here's my code:

    HTML:

    <div id="navcontainer">
    <ul id="navlist">
    <li<?php if(is_home()) echo ' class="current_page_item"' ?>><a href="<?php bloginfo('url'); ?>/">Home</a></li>
    <?php wp_list_pages('title_li=&sort_column=menu_order&depth=0&include=');?>
    </ul>
    </div>

    CSS:
    CSS Here

    Thanks! :)

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Have a look at the nav menu in Twenty Ten.

  3. JRiley21
    Member
    Posted 3 years ago #

    Esmi,

    Thanks. I actually tried that. Took their navigation code and dropped the HTML/CSS into my theme, and for some reason, the sub-pages still didn't display on hover. Everything else worked.

    No sure why...

  4. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    You can't just drop in the CSS from another theme. You need to use it as an example and try to apply the same kind of approach and CSS to your theme and its classes.

Topic Closed

This topic has been closed to new replies.

About this Topic