HTML - Enable Scrolling within a Table's Cell

24,821

The easiest thing would be to add a 500 x 300 div and give it overflow: auto

<td width="500" height="300">
 <div style="width: 500px; height: 300px; overflow: auto">
  lots of data that exceeds the dimensions
 </div>
</td>
Share:
24,821
Moon
Author by

Moon

Updated on July 30, 2022

Comments

  • Moon
    Moon almost 2 years

    Let's say I have a table cell with fixed width and height.... and I have data that exceeds the cell's fixed dimensions...

    <td width="500" height="300">lots of data that exceeds the dimensions</td>
    
    • can I enable scrolling of this data within a cell....
    • if not than what is the solution.. I only have that 500 x 300 space
  • Sarfraz
    Sarfraz over 13 years
    I should have checked first, yes div inside should do the trick +1 :)