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 878595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:47:42+00:00 2026-05-15T11:47:42+00:00

I am building a horizontal navigation that also has a horizontal submenu. Soh Tanaka

  • 0

I am building a horizontal navigation that also has a horizontal submenu. Soh Tanaka has a nice tutorial on it, but the submenu does not display properly.

Here is the HTML:

<ul id="mainNav">
        <li><a class="selected" href="#">Home</a></li>
        <li>
            <span>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
            </span>
        </li>   
        <li><a href="#">About Us</a></li>
        <li>
            <span>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
            </span>
        </li>   
        <li><a href="#">Home Remodels</a></li>
        <li>
            <span>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
            </span>
        </li>   
        <li><a href="#">New Home Builds</a></li>
        <li>
            <span>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
            </span>
        </li>   
        <li><a href="#">Our Portfolio</a></li>
        <li>
            <span>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
            </span>
        <li><a href="#">Our Blog</a></li>
        <li>
            <span>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
            </span>
        </li>   
        <li><a href="#">FAQ'S</a></li>
        <li>
            <span>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
                <a href="#">Sub Item 1</a>
            </span>
        </li>   
        <li><a href="#">Contact Us</a></li>
    </ul>

Here is the css:

ul#mainNav                  { 
                        clear: both;
                        width: 935px;
                        height: 39px; 
                        margin: -5px 0 0 0; 
                        padding: 0; 
                        float: left; 
                        list-style-type: none; 
                        position: relative;
                        background-color: #0d0600; 
                        font: bold 14px Arial, Helvetica, sans-serif; 
                        text-transform: uppercase;
                        color: #fff; 
                        }
ul#mainNav li               { float: left; margin: 0; padding: 0; }
ul#mainNav li a             { padding: 12px 15px 12px 14px; display: block; text-decoration: none; color: #fff;  }
ul#mainNav li a.selected,
ul#mainNav li a:hover       { background: #b5a37e url(../_images/bg_mainNav.jpg) repeat-x left top; }

ul#mainNav span             { 
                        float: left;
                        display: none; 
                        padding: 15px 0;
                        position: absolute;
                        z-index: 10;
                        left: 0;
                        top: 35px;
                        width: 935px;
                        background-color: #b5a37e;
                        color: #fff;
                        text-transform: none;
                        }
ul#mainNav li:hover span    { display: block; }
ul#mainNav li span a        { display: inline; }
ul#mainNav li span a:hover  { text-decoration: underline; }

The only problem is that in my working example, the submenu does not show up.

I would appreciate some guidance here.

Thanks!

  • 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-15T11:47:43+00:00Added an answer on May 15, 2026 at 11:47 am

    first of all you are not doing it right…. view the source of Soh Tanaka’s tuturial…

    the html code block structure is like this,

    <ul id="topnav"> 
            <li><a href="#">Home</a></li> 
            <li> 
                <a href="#">About</a>
                <span> 
                    <a href="#">The Company</a> |
                    <a href="#">The Team</a> |
                    <a href="#">Careers</a> 
                </span> 
            </li>
    ....................... 
    

    in that, Home does not have a sub menu because it has no span in it….
    unlike About which does have the span…. got the difference with your html structure?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building this hotsite that relies heavily on 'heavy' images and animations. It has
Building on what has been written in SO question Best Singleton Implementation In Java
When building static libraries with VS2005 I keep getting linker warnings that VC80.pdb cant
In building an ASP.NET 3.5 WAP, I'm always frustrated by the feeling that no
I am building a GUI for image processing in PyQt. One task that I
When building an iPhone app that uses the Core Plot framework, I am seeing
I'm building a system in Node.js that is supposed to find all files in
I'm building a component that is an extension for another software product. It's loaded
Building on How Do You Express Binary Literals in Python , I was thinking
Building a client-side swing application what should be notified on a bus (application-wide message

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.