#wrapper {
display: table;
min-height: 100%;
height: 100%;
margin: 0px auto;
}
#header-wrap,
#content-wrap,
#footer-wrap {
display: table-row;
height: 1px;
}
#content-wrap {
height: auto;
}
<div id="wrapper">
<div id="header-wrap"></div>
<div id="content-wrap">
<section id="content"></section>
</div>
<div id="header-wrap"></div>
</div>
#wrapper
充当表格,#header-wrap
、#content-wrap
和 #footer-wrap
是表格单元格,它们有助于将页脚推到页面底部。
如何使 #content
填充 #content-wrap
的高度?
我不会使用绝对定位。