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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:43:27+00:00 2026-05-25T19:43:27+00:00

I have a html table: <table id=my-table class=my-table> <tr class=head> <th class=name>Name:</th> <th class=age>Age:</th>

  • 0

I have a html table:

<table id="my-table" class="my-table">

        <tr class="head">                                
               <th class="name">Name:</th>
               <th class="age">Age:</th>
        </tr>

        <tr class="row">
               <td class="name">John</td>
               <td class="age">19</td>
        </tr class="row">

    <tr class="row">
               <td class="name">Kate</td>
               <td class="age">16</td>
        </tr>
       ...
       ...

  </table>

The table can have several rows which fits 100px height area.

Then, I defined a mouse click event, that’s when mouse click on each row’s name column, there will be some content be appended after the clicked row:

function addContent(evt){
   $('.row').after("<tr>"+SOME_CONTENT+"</tr>");
}

$(".name").click(addContent);

It works and the above click event could make the table much longer, since extra content row are appended after each row if mouse clicked.

My Question is, how to make the table scrollable (scroll bar) when mouse clicked on the “name” column? (That’s by default, not scrollable, only when mouse clicked on “name” which triggered extra content appended, then makes it scrollable), so that the table area has the fixed height 100 px always.

I tried in CSS:

.my-table{  
 overflow:scroll;
 height: 100px;
 width: 600px;
 overflow:auto;

}

but it does not 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-05-25T19:43:28+00:00Added an answer on May 25, 2026 at 7:43 pm

    table elements don’t overflow, but you could use a wrapper surrounding the table and add your css to that:

    http://jsfiddle.net/2ezdx/1/

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

Sidebar

Related Questions

I have an html table with many rows. I'm currently grouping several rows inside
I have an html table <table border=0 width=100%> <tr class=headerbg> <th width=5%> No </th>
I have an html table which i bind data dynamically on the server side
I have an HTML table with several columns and I need to implement a
I have a HTML table like this: <table border=1> <tbody> <tr> <td><a href=# class=delete>DELETE
I have a HTML table like this: <table border=1> <tbody> <tr> <td><a href=# class=delete>DELETE
I have an HTML table with a large number of rows, and I need
I would like to have a border for the table with class name as
I have a HTML table which I add items to from javascript on an
I have an HTML table that looks like this: ------------------------------------------------- |Column 1 |Column 2

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.