Magento - 如何将页脚设置为100%宽度?

时间:2015-01-05 10:38:14

标签: css magento footer

我想知道如何将页脚宽度设置为100%?我试图将.footer-container和.footer宽度设置为100%以及绝对位置。

这是网站:

http://buysmartcardsonline.com/

5 个答案:

答案 0 :(得分:1)

如果您将div.footer-container移到div.page容器之外,它应自动覆盖页面的宽度。

在:

<div class="page">
    ...

    <div class="footer-container">...</div>
</div>

后:

<div class="page">
    ...
</div>
<div class="footer-container">...</div>

答案 1 :(得分:0)

class="footer-container"移除class="page"并将其作为class="wrapper"的直接子女

enter image description here

enter image description here

答案 2 :(得分:0)

尝试以下代码 - 我希望这是您正在寻找的代码

.footer-container {
                   left: 0px;
                   width: 100%;
                   position: fixed;
                   bottom: 0px;
                   }

答案 3 :(得分:0)

正如@Hubro在他的回答中所提到的,将div.footer-container移到div.page container之外是理想的。但是如果你不想移动div,你可以尝试使用下面的页脚绝对定位

.wrapper{
   position: relative;
}

.footer-container{
    width: 100%;
    position: absolute;
    left: 0;
    bottom: -27px; (height of the footer container)
}

答案 4 :(得分:0)

您应该将.footer-container放在.page之外,然后在.footer-container中使用.page类添加div,以使页脚内的内容具有相同的宽度。

<div class="page">Your page content</div>

<div class="footer-container">
    <div class="page">
       Footer Content
    </div>
</div>
相关问题