Now this may be extremely simple, but I being new to HTML/CSS, can’t figure it out. Here’s the HTML:
<html>
<body>
<table>
<tr>
<td style="width: 275px;background: gray;overflow: scroll">
<div style="height: 1000px;width: 250px; background: green;" />
</td>
<td style="width: 620px;background: yellow;">
def
</td>
</tr>
</table>
</body>
</html>
And the CSS:
html,body,table
{
height: 100%;
max-height: 500px;
}
What I want is to make this table stretch to full page height; and in case the contents of the left cell are larger than full page height, a simple scrollbar should appear in the left cell to let user scroll through them. But instead, my code makes the whole table larger and the inner scrollbar never appears to work.
Change your styling a little bit:
and remove
max-heightlike @Allan Kimmer Jensen mentioned in commentWorking example
UPDATE
add ID to div and bit of javascript:
updated fiddle