0

我的情况: 我有一个不动的标题,每当我向下滚动时它都会保持原位。我在页脚之前的底部有一个 div。此 DIV 包含 Disqus 评论系统。

问题是:

每当我在底部向下滚动时,DIV 会按预期顺利运行(就在标题下方)Disqus 评论系统超出了应该位于标题下方的标题。

div的代码和comments模板的调用函数如下:

<div class="comments-template" style="position:inherit;">
<?php comments_template(); ?>
</div>

DIV 和 Disqus 评论系统的 CSS 代码如下:

.comments-template{
    width: 1040px;
    position: static;
    margin: auto;
    clear:both;
    background-color:#CCC;

}

#disqus_thread {
    color: #FFF; 
    padding: 5px;
    margin: auto;
    clear:both;
    position:static;
}

.dsq-comment-header {
    background-color: 2d2d2d;
    font-family:"Arial",sans-serif;
    font-size: 12px;
    height: 50px;
    position:static;
    clear:both;
    }

.dsq-comment-message {
    font-family:"Tahoma",sans-serif;
    font-size: 11px;
    color: #333; 

    }
textarea {
    background-image: none;
    background-repeat: repeat;
    border:  #666 2px solid; /* light blue border */

    }
.dsq-comment {
    border: #666 2px solid; /* light blue border */
    margin-bottom: 15px;

    }

我希望你能帮助我解决我的问题。

先感谢您!

4

1 回答 1

1

给你的标题更高z-index

header {
  z-index: 5;
}
于 2011-09-05T23:06:52.893 回答