簡體   English   中英

相同的標記和CSS在ie8不同的頁面上看起來不同

[英]Same markup and css looks different on ie8 different pages

我必須將WordPress主題構建為個人項目。 在IE8中對其進行測試后,頁腳似乎並未在所有頁面上都顯示正確的方式。 這很奇怪,因為所有頁面頁腳都具有相同的樣式。

我什至取消了IE8開發人員工具中的所有樣式,但問題仍然存在。

在聯系頁面中,頁腳似乎位於最左角,因此只能看到一半的頁腳。

在博客頁面上,頁腳似乎越來越寬960px,並且居中。

在其余頁面上,頁腳看起來正常。

正如我上面提到的,所有頁腳頁面都具有相同的樣式,所以我不知道為什么在不同的頁面上頁腳顯示方式不同

這是網站: 網站

我要發布整個頁腳標記和CSS,因為我不知道哪種CSS錯誤會使IE8在不同頁面上顯示相同標記和CSS的方式有所不同:

HTML:

<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>

CSS:

 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;
    }

我認為您應該在style.css文件的頂部包含Reset CSS:

重置CSS

此外,還有更多網站需要在每個瀏覽器中看起來完全相同

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM