基本上,我不知道如何解决它,我需要左右列从页眉到页脚的高度为 100%。这样我就可以调整窗口大小,并且所有内容都将保留在同一个地方。
但是,我的代码不起作用,左右列与页脚重叠。
HTML:
<section id="wrapper">
<header id="topHeader">
header
</header>
<section id="leftSection">
left<br>
</section>
<section id="middleSection">
middle
</section>
<section id="rightSection">
right
</section>
</section>
<footer id="footer">
footer
</footer>
CSS:
html,body{
margin: 0;
padding: 0;
font: 13px/22px Helvetica, Arial, sans-serif;
background: #F0F0F0;
height:100%;
}
#wrapper{
border: solid 1px;
height: 100%;
}
#topHeader{
height: 40px;
}
#leftSection{
border: solid 1px;
border-color: #000000;
position: absolute;
left: 0px;
width: 150px;
margin: 0px;
padding: 0px;
height: 92%;
min-height:200px;
max-height:600px;
}
#rightSection{
border: solid 1px;
border-color: #000000;
position: absolute;
right: 0px;
top:41px;
margin-bottom: 41px;
width: 200px;
color: #564b47;
margin: 0px;
padding: 0px;
height: 100%;
}
#middleSection{
border: solid 1px;
border-color: #000000;
margin: 0px 201px 0px 151px;
padding: 0px;
height:auto;
}
#footer{
border: solid 1px;
border-color: #000000;
clear:both;
height: 100px;
width:100%;
}