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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:46:47+00:00 2026-05-13T17:46:47+00:00

I want to create a scrollable div tag with a fixed height that gets

  • 0

I want to create a scrollable div tag with a fixed height that gets a vertical scroll bar. I’m trying to get this to work in chrome.

This is my CSS:

#designDiv
{
    width:249px;
    height:299px;
    background-color:Gray;
    overflow-y: scroll;
    max-width:230px;
    max-height:100px;
}

It does show the vertical scroll bar but the problem is during the run-time when the user adds some content to the #designDiv. It does not scroll and the #designDiv begins to expand vertically.

How do I create a scrollable div tag vertically for chrome?

  • 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-13T17:46:47+00:00Added an answer on May 13, 2026 at 5:46 pm

    Well, your code worked for me (running Chrome 5.0.307.9 and Firefox 3.5.8 on Ubuntu 9.10), though I switched

    overflow-y: scroll;
    

    to

    overflow-y: auto;
    

    Demo page over at: http://davidrhysthomas.co.uk/so/tableDiv.html.

    xhtml below:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
        <title>Div in table</title>
        <link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
    
            <style type="text/css" media="all">
    
            th      {border-bottom: 2px solid #ccc; }
    
            th,td       {padding: 0.5em 1em; 
                    margin: 0;
                    border-collapse: collapse;
                    }
    
            tr td:first-child
                    {border-right: 2px solid #ccc; } 
    
            td > div    {width: 249px;
                    height: 299px;
                    background-color:Gray;
                    overflow-y: auto;
                    max-width:230px;
                    max-height:100px;
                    }
            </style>
    
        <script type="text/javascript" src="js/jquery.js"></script>
    
        <script type="text/javascript">
    
        </script>
    
    </head>
    
    <body>
    
    <div>
    
        <table>
    
            <thead>
                <tr><th>This is column one</th><th>This is column two</th><th>This is column three</th>
            </thead>
    
    
    
            <tbody>
                <tr><td>This is row one</td><td>data point 2.1</td><td>data point 3.1</td>
                <tr><td>This is row two</td><td>data point 2.2</td><td>data point 3.2</td>
                <tr><td>This is row three</td><td>data point 2.3</td><td>data point 3.3</td>
                <tr><td>This is row four</td><td><div><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ultricies mattis dolor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum a accumsan purus. Vivamus semper tempus nisi et convallis. Aliquam pretium rutrum lacus sed auctor. Phasellus viverra elit vel neque lacinia ut dictum mauris aliquet. Etiam elementum iaculis lectus, laoreet tempor ligula aliquet non. Mauris ornare adipiscing feugiat. Vivamus condimentum luctus tortor venenatis fermentum. Maecenas eu risus nec leo vehicula mattis. In nisi nibh, fermentum vitae tincidunt non, mattis eu metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc vel est purus. Ut accumsan, elit non lacinia porta, nibh magna pretium ligula, sed iaculis metus tortor aliquam urna. Duis commodo tincidunt aliquam. Maecenas in augue ut ligula sodales elementum quis vitae risus. Vivamus mollis blandit magna, eu fringilla velit auctor sed.</p></div></td><td>data point 3.4</td>
                <tr><td>This is row five</td><td>data point 2.5</td><td>data point 3.5</td>
                <tr><td>This is row six</td><td>data point 2.6</td><td>data point 3.6</td>
                <tr><td>This is row seven</td><td>data point 2.7</td><td>data point 3.7</td>
            </body>
    
    
    
        </table>
    
    </div>
    
    </body>
    
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 380k
  • Answers 380k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I use Mac OS X and 64-bit VMWare Fusion, and… May 14, 2026 at 9:49 pm
  • Editorial Team
    Editorial Team added an answer RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^index.php index.php [L] RewriteCond %{REQUEST_FILENAME} !-f… May 14, 2026 at 9:49 pm
  • Editorial Team
    Editorial Team added an answer I haven't done anything like this myself, but I think… May 14, 2026 at 9:49 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.