我正在制作一个页面,并希望我的大纲如下:
一切都很顺利,直到我开始添加正文和侧边栏。侧栏不会延伸到底部。我尝试使用height: 100%
没有运气。当前站点:
CSS:
#wrapper
{
margin: auto auto auto auto;
text-align: center;
border: 10 Black;
background-color: Black;
width: 50%;
}
#left
{
float: left;
border-right: 2px white;
width: 25%;
background-color: Black;
height: 100%;
}
#right
{
float: right;
border-left: 2px white;
width: 25%;
background-color: Black;
height: 100%;
}
body
{
color : Yellow;
background-color: #585858;
width: 960;
height: 100%;
}
.text
{
text-align: center;
margin-left: auto;
margin-right: auto;
float: none;
border: 10px White;
}
HTML:
<div id="right">
<img class="sideimg" src="data/images/kinected logo.png" height="150" width="150"/>
</div>
<div id="left">
<img class="sideimg" src="data/images/kinected logo.png" height="150" width="150"/>
</div>
<div id="wrapper">
<h1>Main header goes here</h1>
<div id="text">
<p>Main text goes here</p>
</div>
</div>