【发布时间】:2011-06-08 19:14:23
【问题描述】:
我在内容换行之外做了一个页脚换行(其他所有内容都在其中)。我想让页脚换行扩展以填充页面的宽度,我希望它固定在底部。代码如下:
footerWrap {
background-color:#000;
width: auto;
}
页脚{
margin: auto;
text-align:center;
width:965px;
height:150px;
background-color:#000;
border:#000 inset medium;
}
网站是 item9andthemadhatters.com,如果您需要任何其他代码或信息,请告诉我。谢谢!!
更新:
html { 填充:0; 高度:100%; 宽度:100%; }
身体{ 边距:-1px 0 0 0; 背景颜色:#FFF; 字体系列:calibri; 背景图像:url(图像/item9HeaderSideFiller.gif); 背景重复:重复-x; 填充:0; 高度:100%; 宽度:100%; }
包装{
width: 965px;
margin:auto auto;
min-height:462px;
max-height:4000
像素;
footerWrap {
background-color:#000;
position:absolute;
bottom:0;
width:100%
}
页脚{
margin: auto;
text-align:center;
width:965px;
height:150px;
background-color:#000;
}
}
【问题讨论】:
-
#footerWrap { 背景颜色:#000;位置:绝对;底部:0;宽度:100% } #footer { 边距:自动;文本对齐:居中;宽度:965px;高度:150px;背景颜色:#000; }
-
html { 填充:0;高度:100%;宽度:100%; } body{ 边距:-1px 0 0 0;背景颜色:#FFF;字体系列:calibri;背景图像:url(图像/item9HeaderSideFiller.gif);背景重复:重复-x;填充:0;高度:100%;宽度:100%; } #wrap { 宽度:965px;边距:自动自动;最小高度:462px;最大高度:4000px; }