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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:44:07+00:00 2026-06-05T01:44:07+00:00

I want to accomplish the following using only CSS and HTML, and not use

  • 0

I want to accomplish the following using only CSS and HTML, and not use JavaScript.

I have a simple HTML table that looks like this. Both columns contain dynamic content, but the left has a scrollable div. I want the display height of that scrollable div to size according to the table, and have the table size be set only by the dynamic height of column2.

<table>
    <tr>
        <td class="column1">
            <div>
            ...
            </div>
        </td>
        <td class="column2">
            <div>
            ...
            </div>
        </td>
    </tr>
</table>

I want the table to adjust its height according to dynamic content in column2 only, not column1, so that I can have a scrollable div in column1 that sizes to the height of the table set by column2 automatically when the page is rendered.

I have found solutions using jQuery, but the performance is very poor when I use height() or outerHeight() to find the height of the right column and set the div inside the left column appropriately, especially when the right column contains a large number of HTML elements which are in their own scrollable divs.

  • 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-05T01:44:09+00:00Added an answer on June 5, 2026 at 1:44 am

    You can use absolute positioning:

    table {
        position: relative;
    }
    
    td {
        background: red;
        width:200px;
    }
    
    .column1>div {
        height:100%;
        overflow: auto;
        position: absolute;
        top:0;
        width:200px;
    }
    <link rel="stylesheet" href="del.css">
    <table>
        <tr>
            <td class="column1">
                <div>
                <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>Text
                </div>
            </td>
            <td class="column2">
                <div>
                <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>Text
                </div>
            </td>
        </tr>
    </table>

    Also available as a jsfiddle.

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

Sidebar

Related Questions

I have a javascript code using which I want to accomplish the following .
I'm stunned by a simple thing that I want to accomplish but does not
Using MVC3 I am trying to accomplish the following. I have a table which
Im not sure that its possible to do what I want to accomplish. I
I have an HTML/XML table generated by AJAX that displays limited columns of a
I want to accomplish the following, but I'm not sure how to do it:
I want to accomplish the following task. I have an web application through which
Need help using regex and powershell to accomplish the following. I have the following
I have a HTML file that contains only the basic elements (html, head, body,
What I'm trying to accomplish is the following: Suppose I have a function that

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.