我的部分HTML未在Chrome中显示

时间:2016-11-03 20:55:13

标签: html css google-chrome

我的页面的前三分之一,包括图形和标题,在Firefox和资源管理器中显示得很好,但从我的服务器访问时不会出现在Chrome中。当将页面作为文件查看时,它确实出现在Chrome中。

图形在CSS文件中定义为:

/** adbox **/

#adbox {
    background: #020a13 url(../images/bg-adbox.jpg) no-repeat center top;
    font-family: Georgia, "Times New Roman", Times, serif;
    min-height: 433px;
    margin: -56px 0 22px;

HTML文件是:

<!DOCTYPE html>
<!-- Website template by freewebsitetemplates.com -->
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>donfiler.net - web design </title>
    <link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
    <div id="header">
        <div class="wrapper clearfix">
            <div id="logo">
                <a href="index.html"><img src="images/logo.png" alt="LOGO"></a>
            </div>
            <ul id="navigation">
                <li class="selected">
                    <a href="index.html">Home</a>
                </li>
                <li>
                    <a href="about.html">About</a>
                </li>
                <li>
                    <a href="blog.html">Blog</a>
                </li>
                <li>
                    <a href="gallery.html">Gallery</a>
                </li>
                <li>
                    <a href="contact.html">Contact Us</a>
                </li>
            </ul>
        </div>
    </div>
    <div id="contents">
        <div id="adbox">
          <div class="wrapper clearfix"><p></p><p></p>
            <div class="info">
                <h1>Web Design &amp; Social Media Marketing</h1>
                <p>
                    Proven Consultant, Author | Helping Companies Translate Their Business Goals to Reality.
                </p>
            </div>
          </div>
            <div class="highlight">
                <h2>707-217-8457 if you want a mobile friendly web site.</h2>
            </div>
        </div>
        <div class="body clearfix">
            <div class="click-here">
                <h1>Impact Marketing</h1>
                <a href="https://donfiler.us/bootblog.html" class="btn1">Click Here!</a>
            </div>
            <p style="font-size:12px;">
                Proven Consultant, Author | Helping Companies Translate Their Business Goals to Reality. We design web sites with dynamic database interaction; deliver computer based training; create comprehensive marketing campaigns; specialize in hand coding HTML, CSS, PHP, Mysql and JavaScript to customize web design and user interface.
            </p>
      </div>
    </div>
    <div id="footer">
        <ul id="featured" class="wrapper clearfix">
            <li>
                <img src="images/THUMBNAIL_IMAGE4.jpg" alt="Img" height="204" width="180">
                <h3><a href="https://www.createspace.com/6457547?ref=1147694&utm_id=6026">Order Now</a></h3>
                <p>
                    Memories of growing up in Europe during the Cold War. The first book in a series about Don's life.  
                </p>
            </li>
            <li>
                <img src="images/THUMBNAIL_IMAGE3.jpg" alt="Img" height="204" width="180">
                <h3><a href="https://www.createspace.com/6419890">Order Now</a></h3>
                <p>
                    A catchy tune by the Beach Boys in the mid-sixties, the lyrics of "Be True to Your School" hit many highlights of high school in that era.
                </p>
            </li>
            <li>
                <img src="images/THUMBNAIL_IMAGE2.jpg" alt="Img" height="204" width="180">
                <h3><a href="https://www.createspace.com/6464083">Order Now</a></h3>
                <p>
                    College Years and Rock Band Entrepreneur. The third book in a series about Don's life.
                </p>
            </li>
            <li>
                <img src="images/THUMBNAIL_IMAGE1.jpg" alt="Img" height="204" width="180">
                <h3><a href="https://www.createspace.com/6634095?ref=1147694&utm_id=6026">Order Now</a></h3>
                <p>
                    Contributing to others is the highest form of success you can achieve and I wanted to impart what I have learned over the years working for a living.
                </p>
            </li>
        </ul>
        <div class="body">
            <div class="wrapper clearfix">
                <div id="links">
                    <div>
                        <h4>Social</h4>
                        <ul>
                            <li>
                                <a href="https://plus.google.com/+DonFilerRohnertPark" target="_blank">Google +</a>
                            </li>
                            <li>
                                <a href="https://www.facebook.com/don.filer" target="_blank">Facebook</a>
                            </li>
                            <li>
                                <a href="https://www.youtube.com/user/donfiler1" target="_blank">Youtube</a>
                            </li>
                        </ul>
                    </div>
                    <div>
                        <h4>Blogs</h4>
                        <ul>
                            <li>
                                <a href="https://donfiler.blogspot.com/">Blogspot</a>
                            </li>
                            <li>
                                <a href="https://impactmarketingconsultant.wordpress.com/">Marketing Blog</a>
                            </li>
                            <li>
                                <a href="https://mobilefriendlywebdesign.wordpress.com/">Web Design Blog</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div id="newsletter">
                    <h4>Newsletter</h4>
                    <p>
                        Sign up for Our Newsletter
                    </p>
                    <form action="https://donfiler.us/newsletter" method="post">
                        <!--<input type="text" value="">-->
                        <input type="submit" value="Sign Up!">
                    </form>
                </div>
                <p class="footnote">
                    © Copyright © 2016 Don Filer all rights reserved.
                </p>
            </div>
        </div>
    </div>
</body>
</html>

2 个答案:

答案 0 :(得分:0)

Google Chrome扩展程序AdBlock正在阻止该元素,因为其ID为adbox。检查您是否启用了该扩展程序。

一般情况下,请尝试避免使用&#34; ad&#34;命名HTML元素时。

答案 1 :(得分:0)

从一开始,我就可以看到代码中的一个主要缺陷 - 你命名了一个元素adbox。大多数广告拦截扩展都以这种方式运作 - 他们会扫描广告,而这个元素会被视为广告,仅仅因为它的名称。

引用CapitalQ

  

通常,在命名HTML元素时请尝试避免使用“ad”一词。

检查您是否启用了广告拦截扩展程序,如果是,请尝试不使用该扩展程序的网站。此外,尽快重命名该元素!