【问题标题】:footer overlap on content内容的页脚重叠
【发布时间】:2012-04-21 02:12:20
【问题描述】:

我有一个这样的 HTML 结构:

<div id="content" class="container_12">
    <div id="right" class="grid_3 alpha">
        <div id="menu_right"></div>
        <div id="adv"></div>


    </div>
    <div id="main_c" class="grid_9 omega">s</div>


</div>
<div id="footer"></div>

但是页脚的内容重叠,我试过了,但什么也没发生。

这里是 CSS:

#footer {
    border-top: 4px dashed white;
    padding-top: 20px;
    margin-top: 40px;
    background-image: url("bannerbg.jpg");
}


#menu_right, #adv { width: 100%;
    min-height: 300px;
    background-color: #e3e3e3;
    margin-bottom: 10px;

    }


#main_c{
    height: 500px;
    background-color: #e3e3e3;
}
#content{
   // its blank
}

它显示如下:

我该怎么办?我试过清楚:在内容和页脚之间:-?

编辑:在线查看,http://barcodes.ir/sap

【问题讨论】:

  • 你的 .container_12 在哪里?
  • 它的 960.gs 网格系统,RTL 一...没有改变
  • 这让我……this。是一样的,唯一的区别是你在台式机(而不仅仅是智能手机)中也有同样的问题,因为中心更大。答案:粘性页脚。谷歌一下。
  • 尝试将overflow: auto 添加到#content。我想知道这些列是否被浮动并且您的 .container_12 没有正确排序。
  • 在线查看barcodes.ir/sap,谢谢

标签: html css 960.gs


【解决方案1】:

好像是css定位,也许你应该在页脚中尝试相对位置。

请参阅this link 了解有关定位的更多信息。

【讨论】:

  • 我使用 position: realtive 作为 footer ,但它不起作用,但是感谢您的链接...我正在阅读
【解决方案2】:

快速解决方案:像这样将z-index: 1000; 添加到#footer css 规则集。像这样:

#footer{
    z-index: 1000;
    ...
    ...
}

您的 z-index 必须高于任何其他内容。显然这些盒子有更高的 z 值,所以你需要重新设置它们。

【讨论】:

  • 亲爱的 lu1s 我需要自动扩展内容的高度。 z-index 似乎不是我的解决方案...谢谢
  • 我认为他希望页脚“清除”内容;不是简单的出现在它面前。
猜你喜欢
  • 1970-01-01
  • 2011-11-19
  • 2017-06-16
  • 1970-01-01
  • 2010-12-05
  • 1970-01-01
  • 2018-10-25
  • 2017-11-28
相关资源
最近更新 更多