-1

Ok, I have a table with two rows. On the first row, I can input text in it, and when I click a button, the text automatically appears in the second row.

The problem is that when I input a text that is too long or too large for the table, then press the button, the second row will not use scrollbars, even though I use overflow:scroll and set the width and height of the td. Instead, it will make the table expand.

What is the right method to use to make the second row use scrollbars?

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by ko ko
0

What version of DOCTYPE do you use? Did you put the DOCTYPE in your HTML? Use div instead of table. It will make you comfortable and solve your problem. Here is example.

HTML:
<div id="first-row">
This is the first.<a href="javascript:show()">Show content</a>
</div>
<div id="second">
This content will show when you click a link or button placed above div.
</div>

CSS:
#second {
        overflow: auto;
        height: 66px;
        max-height: 66px; /* IE ignore this declaration */
        display: block
       }

Good luck..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.