我在内容包装(其他所有内容都在里面)外面制作了一个页脚包装。我想让页脚换行延伸以填充页面的宽度,并且我希望它固定在底部。这是代码:
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;
最佳答案
填充页面
width:100%
要留在页面底部,一个解决方案可能是
position:absolute;
bottom:0;
请注意,在 body 和 html 中都必须设置
padding:0
height:100%;
关于html - 将页脚换行扩展到页面宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4685501/