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

  • SEARCH
  • Home
  • 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 751893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:43:10+00:00 2026-05-14T14:43:10+00:00

I’m close to nailing this flyout menu I have been working on, just have

  • 0

I’m close to nailing this flyout menu I have been working on, just have a couple of current pain points.

I’m trying to get left/right padding on my submenu items, as you can see I am not quite there. Also when the first submenu is displayed, I want to create a bit of a gap between the first row of list items and the child.

Below is my current code and a screen shot displaying what I want. Based on my current CSS, any thoughts on how to get this done in a clean way?

alt text http://www.ajondeck.net/temp/jFlyout.png

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript">
    function mainmenu() {
        $("#nav ul").css({ display: "none" }); // Opera Fix
        $("#nav li").hover(function() {
            $(this).find('ul:first').css({ visibility: "visible", display: "none" }).show(400);
        }, function() {
            $(this).find('ul:first').css({ visibility: "hidden" });
        });
    }


    $(document).ready(function() {
        mainmenu();
    });
</script>

<style type="text/css">
    *
    {
        padding: 0px;
        margin: 0px;
    }
    body
    {
        font-size: 0.85em;
        font-family: Verdana, Arial, Helvetica, sans-serif;
    }
    #nav, #nav ul
    {
        margin: 0;
        padding: 0;
        list-style-type: none;
        list-style-position: outside;
        position: relative;
    }
    #nav a
    {
        display: block;
        padding: 4px 0px 4px 0px;
        color: #dfca90;
        text-decoration: none;
        background-color: #ECE9D8;
        font-size: 9px;
        font-weight: bold;
        font: bold 15px Palatino, 'Palatino Linotype' , Georgia, serif;
    }
    #nav > li > a
    {
        font-size: 16px;
        font-variant: small-caps;
        border-right: 1px solid #dfca90;
        padding-right: 10px;
        padding-left: 10px;
        padding-bottom: 6px;
        padding-top: 6px;
        background-color: #fff;
        color: #dfca90;
    }
    #nav li ul li a:hover
    {
        color: #999;
    }
    #nav li
    {
        float: left;
        position: relative;
    }
    #nav ul
    {
        position: absolute;
        display: none;
        width: 170px;
        border: 2px solid #dfca90;
    }
    #nav ul li
    {
    }
    #nav li ul a
    {
        width: 170px;
        height: auto;
        float: left;
    }
    #nav ul ul
    {
        top: -2px;
    }
    #nav li ul ul
    {
        left: 170px;
        background-color: #ECE9D8;
    }
    #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul
    {
        display: none;
    }
    #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul
    {
        display: block;
    }
</style>
</head>
<body>
<ul id="nav">
    <li><a href="#">1 HTML</a></li>
    <li><a href="#">2 CSS</a></li>
    <li><a href="#">3 Javascript </a>
        <ul>
            <li><a href="#">3.1 jQuery</a>
                <ul>
                    <li><a href="#">3.1.1 Download</a> </li>
                    <li><a href="#">3.1.2 Tutorial</a> </li>
                </ul>
            </li>
            <li><a href="#">3.2 Mootools</a></li>
            <li><a href="#">3.3 Prototype</a></li>
        </ul>
    </li>
</ul>
</body>
</html>
  • 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-14T14:43:10+00:00Added an answer on May 14, 2026 at 2:43 pm

    Here’s an edited version. Put it in http://www.quickdiff.com/ to see what I changed (yours in the left side, and mine in the right side).

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    
    <script type="text/javascript">
        function mainmenu() {
            $("#nav ul").css({ display: "none" }); // Opera Fix
            $("#nav li").hover(function() {
                $(this).find('ul:first').css({ visibility: "visible", display: "none" }).show(400);
            }, function() {
                $(this).find('ul:first').css({ visibility: "hidden" });
            });
        }
    
    
        $(document).ready(function() {
            mainmenu();
        });
    </script>
    
    <style type="text/css">
        *
        {
            padding: 0px;
            margin: 0px;
        }
        body
        {
            font-size: 0.85em;
            font-family: Verdana, Arial, Helvetica, sans-serif;
        }
        #nav, #nav ul
        {
            margin: 0;
            padding: 0;
            list-style-type: none;
            list-style-position: outside;
            position: relative;
            background-color: #ECE9D8;
        }
        #nav a
        {
            display: block;
            padding: 4px 0px 4px 0px;
            color: #dfca90;
            text-decoration: none;
            font-size: 9px;
            font-weight: bold;
            font: bold 15px Palatino, 'Palatino Linotype' , Georgia, serif;
        }
        #nav > li > a
        {
            font-size: 16px;
            font-variant: small-caps;
            border-right: 1px solid #dfca90;
            padding-right: 10px;
            padding-left: 10px;
            padding-bottom: 6px;
            padding-top: 6px;
            background-color: #fff;
            color: #dfca90;
        }
        #nav li ul li a:hover
        {
            color: #999;
        }
        #nav li
        {
            float: left;
            position: relative;
        }
        #nav ul
        {
            left: -1px;
            top: 35px;
            padding: 0 0 0 5px;
            position: absolute;
            display: none;
            width: 170px;
            border: 2px solid #dfca90;
        }
        #nav ul li
        {
        }
        #nav li ul a
        {
            width: 170px;
            height: auto;
            float: left;
        }
        #nav ul ul
        {
            top: -2px;
        }
        #nav li ul ul
        {
            left: 170px;
            background-color: #ECE9D8;
        }
        #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul
        {
            display: none;
        }
        #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul
        {
            display: block;
        }
    </style>
    </head>
    <body>
    <ul id="nav">
        <li><a href="#">1 HTML</a></li>
        <li><a href="#">2 CSS</a></li>
        <li><a href="#">3 Javascript </a>
            <ul>
                <li><a href="#">3.1 jQuery</a>
                    <ul>
                        <li><a href="#">3.1.1 Download</a> </li>
                        <li><a href="#">3.1.2 Tutorial</a> </li>
                    </ul>
                </li>
                <li><a href="#">3.2 Mootools</a></li>
                <li><a href="#">3.3 Prototype</a></li>
            </ul>
        </li>
    </ul>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have been unable to fix a problem with Java Unicode and encoding. The

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.