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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:47:47+00:00 2026-06-04T19:47:47+00:00

I have a menu built using divs, each section is composed by 2 divs

  • 0

I have a menu built using divs, each section is composed by 2 divs (Title and content). The content is collapsed or expanded when the title is clicked, but on IE8 the space between the section divs is shrinking after expanding and collapsing a section.IE9, Chrome, and Firefox display everything correctly

This is how it looks, the first section is displaying correctly with the space below it, but on the rest the space is shrinked

The weird thing is if I resize the window, everything looks fine again

This is a sample of the code I’m using, and this is the jsfiddle

I hope somebody have solved the same issue. 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-04T19:47:49+00:00Added an answer on June 4, 2026 at 7:47 pm

    Try this code:

    There is an explanation of the problem here :

    http://jqueryfordesigners.com/animation-jump-quick-tip/

    Effectively, wrap each pair of title and content elements in a containing div, and then apply your padding to the bottom of that. Tested in IE7, IE8, FF, & Chrome

     <!doctype html>
    <html>
        <head>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script>
        $(document).ready(function(){
            $(".menu-section-content").hide();
            $(".menu-section-title").click(function() {
                var theHeight = $(this).height();
                $(this).css('height', theHeight);
                $(this).next(".menu-section-content").slideToggle(600);
                $(this).toggleClass('collapse');
            });
        });
        </script>
    
        <style>
            div.menu-section-content
            {
                border: 1px solid #777;
                border-top: none;
                padding: 10px;
                margin-left: 5px;
                background-color: #ffffff;
            }
            div.menu-section-title
            {
                font-size: 100%;
                border: solid 1px #777777; /*border-radius: 5px 0px 0 0;*/
                background-color: #A9C3C4;
                color: #fff;
                font-weight: 500;
                margin-left: 5px;
                cursor: pointer;
                clear: both;
                padding: 5px;
    
    
            }
            .expand
            {
                background-image: url('http://upload.wikimedia.org/wikipedia/commons/1/1a/Silk_bullet_arrow_up.png');
                background-repeat: no-repeat;
                background-position: right center;
            }
            .collapse
            {
                background-image: url('http://souper-spices.com/wp-content/themes/shopperpress/template_shopperpress/images/langs/arrow.png');
                background-repeat: no-repeat;
                background-position: right center;
            }
    
            .container {
                padding-bottom: 10px;
            }
    
        </style>
        </head>
    
        <body>
        <div class="container">
        <div class="menu-section-title expand">
        title
        </div>
    
        <div class="menu-section-content">
            options
        </div>
    
        </div>
    
        <div class="container">
        <div class="menu-section-title expand">
        title
        </div>
    
        <div class="menu-section-content">
            options
        </div>
        </div>
    
        <div class="container">
        <div class="menu-section-title expand">
        title
        </div>
    
        <div class="menu-section-content">
            options
        </div>
        </div>
    
        <div class="container"> 
        <div class="menu-section-title expand">
        title
        </div>
    
        <div class="menu-section-content">
            options
        </div>
        </div>
    
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a persistent dropline menu with two levels using only CSS. It
I have a menu that is built using its own AS3 class, when a
I have built a nav menu in wordpres using a posts GUID, and post
I'm using the bootstrap css framework and have built a horizontal menu. It works
I have two activities that both contain an identical context menu built programmatically using
I'm trying to build a menu using a UItableView with Custom cells which have
I have a menu built with <ul> and <li> tags. I want to have
I have built a simple menu in jQuery http://vanquish.websitewelcome.com/~toberua/ Here is a sample of
I have built a drop-down menu here http://dev.driz.co.uk/jsonmenu/ that uses JSON to dynamically build
I have a menu bar and I want to create a div for each

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.