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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:25:17+00:00 2026-06-04T00:25:17+00:00

The CSS: #divMainMenu ul { list-style-type: none; padding: 5px 0; height:400px; } #divMainMenu li

  • 0

The CSS:

#divMainMenu ul {
    list-style-type: none;
    padding: 5px 0;
    height:400px;
}
#divMainMenu li {
    height: 17px;
    margin: 3px 0;
    padding: 14px 2px;
    border: 1px solid #eee7cb;
    background: url(../../Images/50pTransparent-20x20.png) repeat;
}
#divMainMenu li ul{
    display: none;
}

The html and script:

<script type="text/javascript">
function Show(pObj)
{
pObj = document.getElementById(pObj).id;
if (document.getElementById(pObj).style.display=='none')
    document.getElementById(pObj).style.display='block';
else
    document.getElementById(pObj).style.display='none';
}
</script>
<div id="divSidePanel">
    <div id="divMainMenu">
        <ul>
            <li onclick="Show('Buyers')">Buyers
                <ul id="Buyers" style="display:none;">
                    <li>Search</li>
                    <li>Submit request</li>
                    <li>Send message to owner</li>
                </ul>
            </li>
            <li>Sellers</li>
            <li>Contact Us</li>
        </ul>
    </div>
</div>

The problem:
When I click on the text Buyers, it shows the sub/nested list. However, the other items do not make space for the nested list. Thus the nested list writes over the space of the main list.

Is this a problem with my code or is it the standard way it’s meant to work? And is there a way to let the other items ‘push down’ making way for the nested items?

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-06-04T00:25:18+00:00Added an answer on June 4, 2026 at 12:25 am

    Take this out of your css:

    #divMainMenu li ul{
        display: none;
    }
    

    And change the height property to min-height on your #divMainMenu li selector

    Resultant css:

    #divMainMenu ul {
        list-style-type: none;
        padding: 5px 0;
        height:400px;
    }
    #divMainMenu li {
        min-height: 17px;
        margin: 3px 0;
        padding: 14px 2px;
        border: 1px solid #eee7cb;
        background: url(../../Images/50pTransparent-20x20.png) repeat;
    }
    #divMainMenu li ul{
    
    }​
    

    Example

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

Sidebar

Related Questions

My Css #container{ display:block; } #container ul{ list-style:none; position:relative; margin:0px; padding:0px; display:block; } #container
CSS: .about dt { list-style-type:none; font-weight:bold; } .about dd { list-style-type: disc; list-style-position: outside;
css #inchannel li{ width:179px; height:40px; margin:0px 0px 0px 0px; padding:0px 0px 0px 0px; font-size:17px;
// CSS #popupUser{width:180px; height:180px; position:absolute; background:#FFFFFF; border:#000000 2px solid; display:none;} .viewUser{width:173px; float:left; padding:10px; margin-left:20px;
CSS decimal list style type, the hanging number doesnt have the same baseline as
CSS code body { background-attachment: scroll; background-clip: border-box; background-color: #ececec; background-image: none; background-origin: padding-box;
css: #container_im.collapsed{ background-color:red; height: 48px; margin-bottom: 10px; margin-right: 10px; width: 227px; } #container_im.expanded{ background-color:green;
css: .listingContainer { margin:auto; overflow:hidden; padding:0 0 16px 16px; width:660px; } .listingItem { float:left;
CSS :- #sidebar .sidelink h6{ margin-left: 10px; padding-left: 22px; padding-top: 9px; color: #f1f1f1; font-size:
CSS: #holidayclosings ul{ margin:0; padding:0; background:red; } HTML: <ul id=holidayclosings> <li>Saturday, December 24: <b>Closed</b></li>

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.