I'm in the process of creating a scrolling table with a maximum height, and here's what I've done so far:
<table>
<tbody style="height: 300px; overflow:auto;">
//php for loop to populate table with <tr>s/<td>s
</tbody>
</table>
Everything seems to be working well, except when there are only one or two rows, they end up stretched to fit the 300px height. I tried changing 'height' to 'max-height', but then the scroll bars never show up, no matter how big the table gets. Can anyone help me figure out where I'm making a mistake?