Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7085315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:24:34+00:00 2026-05-28T07:24:34+00:00

I’m struggling to position the second level of a dropdown nav menu and was

  • 0

I’m struggling to position the second level of a dropdown nav menu and was looking for some help please.

The nave itself works fine, it’s just that it displays below the parent, where as I want it to display to the right of it.

For Example, if you were to hover over ‘Home’, you should get ‘Offices’ appear below (works), and when hover over ‘Offices’ you should see a menu with all of the offices, to the right, but it is currently displaying below, obscuring all other options.

/** For the dropdown pages in the menu */
#header-nav li ul.children{
    background: #000000;
    display: block;
    float: none;
    position: absolute;
}
#header-nav li ul.children li{
    float: none;
}
#header-nav li ul.children li a{
    background: #000000;
    display: block;
}
#header-nav li ul.children li a:hover{
    background: #0066b5;
}
/** For the second level dropdown pages in the menu */
#header-nav li ul.children li ul.children{
    background: #000000;
    display: block;
    float: none;
    position: absolute;
}
#header-nav li ul.children li ul.children li{
    float: none;
}
#header-nav li ul.children li ul.children li a{
    background: #000000;
    display: inline;
}
#header-nav li ul.children li ul.children li a:hover{
    background: red;
}

As requested, here is a sample of the HTML from the site –

<li class="page_item page-item-9"><a>Precedents</a>
<ul class='children'>
    <li class="page_item page-item-256"><a href="http://intranet.dynedrewett.com/precedents/agricultrul-precedents/">Agricultrul Precedents</a>
    <ul class='children'>
        <li class="page_item page-item-258"><a href="http://intranet.dynedrewett.com/precedents/agricultrul-precedents/chapter-1-agricultural-partnerships-and-companies/">Chapter 1 &#8211; Agricultural Partnerships and Companies</a></li>
    </ul>
</li>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:24:35+00:00Added an answer on May 28, 2026 at 7:24 am

    Looking at your code I’d recommend trying to use the child selector instead of the descendent selector.

    Instead of

    #header-nav li ul.children li ul.children {
    

    You should consider using

    #header-nav > li > ul.children > li > ul.children {
    

    To prevent potential interference.

    To get further into the problem it’d be nice if you’d give us some HTML code to work with.

    I think I have it figured out for you. The key is to set “ul.children”, “a” and “li” as “display:inline”. See the following code which worked for me, also note the “white-space:nowrap” property:

    #header-nav > ul > li > ul.children{
        position: absolute;
    }
    #header-nav > ul > li > ul.children > li {
        float: none;
    }
    #header-nav > ul > li > ul.children li > a{
        display: inline;
    }
    
    #header-nav > ul > li > ul.children > li > ul.children{
        display: inline;
        position: absolute;
    }
    #header-nav > ul > li > ul.children > li > ul.children > li {
        white-space:nowrap; /*Prevents words/links from being cut off*/
    }
    #header-nav > ul > li > ul.children > li > ul.children > li > a {
        display: inline;
    }
    

    Tested with the following HTML:

    <div id="header-nav">
        <ul>
            <li>
                <a>Home</a>
                <ul class="children">
                    <li>
                        <a href="#">Offices</a>
                        <ul class="children">
                            <li><a href="#">Office #1</a></li>
                            <li><a href="#">Office #2</a></li>
                            <li><a href="#">Office #3</a></li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.