У меня есть <div>
на моей странице, которая содержит <table>
различного количества строк, то есть различную высоту:
<html>
<head></head>
<body>
<div>
<table>
<tr>...
<tr>...
...
</table>
</div>
</body>
</html>
В настоящий момент, если содержимое таблицы достаточно длинное, div продолжается ниже нижней части страницы (порт просмотра). Я хочу остановить div, расположенный ниже нижней части страницы, и добавить полосу прокрутки. Я могу добавить полосы прокрутки, если высота div не исправлена с помощью overflow: scroll
. Но я хочу, чтобы высота div соответствовала размеру окна браузера.
Любые идеи, как достичь этого? Мне не нужно или нужно, чтобы div расширялся до нижней части страницы, если нет содержимого таблицы. Предпочтительно чистое решение css, в отличие от использования javascript для фиксации высоты div.
Спасибо