首页 文章

将页脚换行延伸到页面宽度

提问于
浏览
1

我在内容包装外面做了一个页脚包装(其他一切都在其中) . 我想使页脚包装延伸以填充页面的宽度,我希望它固定在底部 . 这是代码:

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 {padding:0;高度:100%;宽度:100%; }

body {margin:-1px 0 0 0;背景色:#FFF; font-family:calibri;背景图像:网址(图像/ item9HeaderSideFiller.gif); background-repeat:repeat-x;填充:0;高度:100%;宽度:100%; }

wrap {

width: 965px;
margin:auto auto;
min-height:462px;
max-height:4000

PX;

footerWrap {

background-color:#000;
position:absolute;
bottom:0;
width:100%

}

页脚{

margin: auto;
text-align:center;
width:965px;
height:150px;
background-color:#000;

}

}

2 回答

  • 2

    填写页面

    width:100%
    

    要保持在页面底部,解决方案可能是

    position:absolute;
    bottom:0;
    

    请注意,在body和html中你必须设置

    padding:0
    height:100%;
    
  • 0

    在footerWrap中尝试 width:100% . 另外,你是什么意思固定在底部?你的意思是,即使滚动,页脚应始终位于屏幕的底部吗?或者你的意思是它应该始终位于页面的底部?

相关问题