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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:06:19+00:00 2026-05-27T18:06:19+00:00

I have an issue with two adjacent div columns. It is a common use

  • 0

I have an issue with two adjacent div “columns”. It is a common use case that one of them might be gargantually taller than the other one, and this can be a usability issue, since users drag’n’drop items from one div to the other.

Using jQuery, I’d like to make sure that these two columns are always equal height. Not just on page load, but also if their inner content ever changes, or they’re animated with jQuery or the page is resized or any other possible reason the height of taller div changes, the other one will follow.

What would be the fastest processing way of achieving this? (I’d like minimal lag on redraws on window resizing)

Thanks a lot in advance!

  • 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-27T18:06:20+00:00Added an answer on May 27, 2026 at 6:06 pm
    <div class="same_height_kids"><div>foo></div><div>bar</div></div>
    
    $('.same_height_kids').bind('DOMSubtreeModified change', function(e){
      var min = 0;
      $(e.currentTarget).children().each(function(i, e){
        $(e).css({minHeight: 0});
        if($(e).height() > min){
          min = $(e).height();
        }
      });
      $(e.currentTarget).css({minHeight: min});
      $(e.currentTarget).children().each(function(i, e){
        $(e).css({minHeight: min});  
      });
    });
    

    this is not tested code. the DOMSubtreeModified event is not supported be IE older then 9 nor by opera. as much as i know the onChange event works instead in some browsers. onResize usually only on windows and frames.

    this implementation has the flaw that the divs can’t get smaller. for that you have to remove the min-height before calculating the new height.

    EDIT: updated code. example on http://jsfiddle.net/ADY3F/5/

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

Sidebar

Related Questions

I have an issue where I have two pages that deal with very similar
I have an issue with a table containing three cells in one row. Two
I have two tables: Issue and Return . Both tables have columns article_id ,
I have an issue with date Formatter. I have Two string. one string contains
I have simple issue setting a two-way databinding of a checkbox in Silverlight 3.0.
I have a very strange issue on my hands. I have two IIS websites
I have made a simple test application for the issue, two winforms each containing
The issue at hand is this. We have a web application with two different
been struggling with an issue now for a day or two. I have an
What is the issue with this code? Here we have two files: classA.h and

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.