html - 将页脚换行扩展到页面宽度

标签 html css shtml

我在内容包装(其他所有内容都在里面)外面制作了一个页脚包装。我想让页脚换行延伸以填充页面的宽度,并且我希望它固定在底部。这是代码:

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/

相关文章:

javascript - 跨域 iframe 可以检测浏览器的实际视口(viewport)尺寸吗?

html - 如果元素具有相同的 z-index 值,如何相对定位它们?

php - 登录用户的IP地址、日期和时间

php - htaccess - 将 .shtml 和 .html 重写为 . PHP

html - 搜索按钮在我的代码中不起作用

php 正则表达式去除不需要的 html 属性

html - 我的标签与下拉列表重叠......我想在它们之间添加空间

jquery - CSS定位元素

python - DJango 1.8 在子模板上使用完全不同的 CSS

apache - WAMP 服务器端包括不适用于 .shtml 文件