ie8不同页面上的相同标记和css看起来不同

时间:2012-08-23 20:28:51

标签: html css css3 css-float

您好我已经构建了一个wordpress主题作为个人项目。在IE8中测试之后,页脚似乎没有在所有页面上显示核心方式。由于所有页面页脚具有相同的样式,因此非常奇怪。

我甚至停用了IE8开发人员工具中的所有样式,但问题仍然存在。

在联系页面中,页脚似乎位于最左侧的角落,只显示了一半的页脚。

在博客页面上,页脚似乎正在设置960px的宽度并且它居中。

在页面的其余部分,页脚看起来没问题。

正如我上面提到的,所有页脚都具有相同的样式,所以我不知道为什么在不同的页面上页脚的显示方式不同

这是网站: website

我发布了我的整个页脚标记和CSS因为我没有想到什么样的CSS错误可以使ie8在不同的页面上显示相同的标记和css:

<footer>
    <div class="center">
          <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer Sidebar') ) : ?>  
          <h2 class="widget-title">No Widgets added</h2>  
          <p>Please login and add some widgets to this sidebar</p>  
          <?php endif ?>     
     </div>
        <div id="copyright">
            <p>&copy; Copyright <?=date('Y');?> <?php bloginfo('name'); ?> by <a href="<?php echo AUTHOR_URL ?>"><?php echo AUTHOR ?></a> All Rights Reserved.</p>
        </div>
       <?php wp_footer(); ?>
</footer>

footer{
    background:url(img/footer.png) repeat-x #1a1a1a;
    padding:33px 0;
}
footer div.center{
    overflow:hidden;
}
footer div.center div.boxFooter{
    display: inline-block;
    float:left;
    width:210px;
    margin-left: 40px;
}
footer div.center div.boxFooter:first-child{
    margin-left: 0;
}
footer div.center div h2{
    color:#cccccc;
    font-size: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ccc;
}
footer div.center div li{
    padding:10px 0;
    border-bottom:1px solid #b6b6b6;
}footer div.center div li:last-child{
    border:none;
}
footer div.center div li a{
    text-decoration: none;
    color:#b6b6b6;
}
footer div.center div li a:hover{
    text-decoration: underline;
}
footer div.center div p{
    margin-top: 10px;
    text-align: justify;
    color:#b6b6b6;
}
footer form#searchform input{
    border-radius:5px;
    margin-top: 15px;
}
div#copyright{
    width:960px;
    margin:0 auto;
    border-top:1px solid #b6b6b6;
    margin-top:25px;
    color:#b6b6b6;
}
div#copyright p{
    margin-top:30px;
    text-align: center;
}
div#copyright p a{
    color:#1fa2e1;
    text-decoration: none;
}
div#copyright p a:hover{
    text-decoration:underline;
}
footer div.tagcloud{
    padding-top: 15px;

}
footer div.tagcloud a{
    color:#B6B6B6;
    text-decoration: none;
}
footer div.tagcloud a:hover{
    text-decoration: underline;
}

1 个答案:

答案 0 :(得分:0)

我认为你应该在style.css文件的顶部包含重置CSS:

RESET CSS

更多do websites need to look exactly the same in every browser

相关问题