+-------------------+
| Top (fixed) |
+-------------------+
| |
| |
| Middle (fill) |
| |
| |
+-------------------+
| Bottom (fixed) |
+-------------------+
верхняя и нижняя - фиксированные div. Они расположены сверху и снизу окна браузера. Я хочу, чтобы часть средняя заполнила остальную часть окна между верхними и нижними div.
Если это содержимое больше, чем его высота, я могу использовать полосы прокрутки. Но его размер не должен превышать окна.
Мои CSS и HTML:
html, body, #main
{
height: 100%;
}
#content
{
background: #F63;
width: 100%;
overflow: auto;
height: 100%;
margin-bottom: -100px;
}
#footer
{
position: fixed;
display: block;
height: 100px;
background: #abcdef;
width: 100%;
}
<div id="main">
<div id="content">xyz</div>
<div id="footer">abc</div>
</div>