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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:37:17+00:00 2026-06-10T08:37:17+00:00

I have 2 html tables, I need to have each row with the same

  • 0

I have 2 html tables, I need to have each row with the same height.

So if table#1’s 3rd row has a height of 25, then table#2’s 3rd row should have a height of 25.

Whichever matching row has the largest height, then both rows should have the same height.

How can I do this?

I know how to traverse the rows like:

$("table1 tr").each(function() {

});

$("table2 tr").each(function() {

});
  • 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-10T08:37:18+00:00Added an answer on June 10, 2026 at 8:37 am

    You can do something like this (assuming both tables have an equal amount of rows):

    //for each row in table one
    $("#table1 tr").each(function(index, element){
    
        //get row height from table1 and the corresponding row in table two
        var rowOneHeight = $(this).height();
        var rowTwo = $("#table2 tr:eq(" + index + ")");
    
        //if no matching row was found in table two, stop loop
        if(!rowTwo.length) return false;
    
        var rowTwoHeight = rowTwo.height();
    
        //compare row heights, and set the least high row to the height of the highest one
        if(rowOneHeight > rowTwoHeight){
            //set rowTwoHeight to rowOneHeight
            rowTwo.height(rowOneHeight);
        }else{
            $(this).height(rowTwoHeight);
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have HTML table. I'm looping through table and iterate over each row whose
I have an HTML Table with each row: <table> <tr><td><a href='#' id='1' class='delete'>delete</a></td></tr> <tr><td><a
I have a table and I need to get values for each row (in
I have a table with id=selector. Each row's cell has a corresponding input to
I have a table populated with data from the database, where each row has
I have the following HTML table. In the last column of each row there
I have an HTML table with a large number of rows, and I need
I have a table listing with a 'notes' field in each row. I'd like
I have HTML Like Below. I have a table inside another table.Each TD in
I have the following table that contains checkboxes in each row. When checkbox status

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.