【发布时间】:2013-10-01 00:08:13
【问题描述】:
我想用可变的中间内容宽度将页眉和页脚扩展到 100%。
您可以在http://jsfiddle.net/9dWcZ/找到源代码
HTML:
<div class="header">
this is header
</div>
<div class="content">
this is content
</div>
<div class="footer">
this is footer
</div>
CSS:
.header, .footer {
width:100%;
background:#999;
height:200px;
position:relative;
float:left;
clear:both;
display:block;
}
.content {
width:2500px;
height:100px;
background:#9B191B;
float:left;
}
我不想要固定的标题并且不改变结构..
请帮忙..
谢谢,
【问题讨论】:
-
不清楚您要做什么。你能解释一下
.content应该如何显示吗? -
您已将内容宽度指定为 2500 像素。这是固定的,还是可以动态的?