WordPress.org

Ready to get started?Download WordPress

Forums

ul.children problem (3 posts)

  1. StevenNexus90
    Member
    Posted 1 year ago #

    Hey everyone

    I'm wondering if you can help me.

    I have a main navigation vertical menu on a website, I have set it up so you make new pages within a parent page, it pops out to the side. This function uses the ul.children code.

    However I would like to allow comment replying within the blog section, however comment replies use the same ul.children code, so my comments take on the navigation pop-out effect and don't display. Is there a work-a-round for this?

    Thanks in advance.

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    make your css more specific to the menu;

    example:

    #menu ul.children { ... }

    #menu might be different in your code.

  3. StevenNexus90
    Member
    Posted 1 year ago #

    I think that will work!

    I don't know why I didn't think of that!

    My CSS is like this;

    <div id="sidebar">
      <ul id="main-nav">
        <li><a href="linkpath">About Us</a></li>
        <li><a href="linkpath">Services</a>
          <ul class="children">
          <li><a href="linkpath">Portraits</a></li>
          <li><a href="linkpath">Weddings</a></li>
          </ul>
        </li>
        <li><a href="linkpath">Blog</a></li>
        <li><a href="linkpath">Contact</a></li>
      </ul>
    </div>

    So if I specify in the CSS;

    ul#main-nav ul.children {
      /* Styling */
    }

    It should work? It seems to make sense :)

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.