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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:11:54+00:00 2026-06-18T01:11:54+00:00

Now this may be extremely simple, but I being new to HTML/CSS, can’t figure

  • 0

Now this may be extremely simple, but I being new to HTML/CSS, can’t figure it out. Here’s the HTML:

<html>
    <body>
        <table>
            <tr>
                <td style="width: 275px;background: gray;overflow: scroll">
                    <div style="height: 1000px;width: 250px; background: green;" />
                </td>
                <td style="width: 620px;background: yellow;">
                    def
                </td>
            </tr>
        </table>
    </body>
</html>

And the CSS:

html,body,table
{
    height: 100%;
    max-height: 500px;
}

What I want is to make this table stretch to full page height; and in case the contents of the left cell are larger than full page height, a simple scrollbar should appear in the left cell to let user scroll through them. But instead, my code makes the whole table larger and the inner scrollbar never appears to work.

  • 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-18T01:11:56+00:00Added an answer on June 18, 2026 at 1:11 am

    Change your styling a little bit:

    <td style="width: 275px;background: gray;overflow: scroll; height: 100%">
       <div style="height: 100%;width: 250px; background: green;float: left" id="test" />
    </td>
    <td style="width: 620px;background: yellow;">
       def
    </td>
    

    and remove max-height like @Allan Kimmer Jensen mentioned in comment

    html,body,table
    {
        height: 100%;
    }
    

    Working example

    UPDATE

    add ID to div and bit of javascript:

    <script type="text/javascript">
            function elementHeight(element) {
                var height = 0;
                var body = window.document.body;
                if (window.innerHeight) {
                    height = window.innerHeight;
                } else if (body.parentElement.clientHeight) {
                    height = body.parentElement.clientHeight;
                } else if (body && body.clientHeight) {
                    height = body.clientHeight;
                }
                document.getElementById(element).style.height = height + "px";
            }
            elementHeight('test');
    </script>
    

    updated fiddle

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

Sidebar

Related Questions

now this is embarrassing. I'm writing quick script and I can't figure out why
Now this may seem like a silly question, but I need to know how
This may be a silly question, but right now I have a rather large
I am quite new in this. Now this simple app downloads image as a
This may be a very simple question, but I haven't found an answer to
I'm extremely new to Rally development so my question may sound dumb (but couldn't
I know this may sound extremely nooby, so sorry in advance but I am
This may be very basic, but I've done a lot of Googling and can't
I am extremely new to Sass/Compass, so this question may sound dumb to many
Now this is example list : List<List<KeyValuePair<string, double>>> dblWordFreqByCluster = new List<List<KeyValuePair<string, double>>>(); What

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.