I have a table with a fixed height in which one row has a fixed height and the other has a height, and I need to get the scroll bar in a flexible row when its internal content is high. Can this be done?
<table style="width: 50%; height: 300px; overflow:auto"> <tr> <td style="height: 50px;background:grey"></td> </tr> <tr style="overflow:auto"> <td style="background:yellow; overflow:auto"> <script> for (i = 0; i <= 30; i++) { document.write(i + " Sample text<br>"); } </script> </td> </tr> </table>
UPD: changed the code to more explicit. I need overflow: auto on my yellow block. After inserting a large number of content tables, the height exceeds 300 pixels
source share