Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html CSS谷歌广告定位_Html_Css_Adsense - Fatal编程技术网

Html CSS谷歌广告定位

Html CSS谷歌广告定位,html,css,adsense,Html,Css,Adsense,我在屏幕上显示我的谷歌广告时遇到问题 当我使用此代码时: <div class="top-bar"> <div class="logo"> <a href=""><img src="FMHLogo.png" alt="Logo" border=0></a> <div style="top:-25;"></div> <sc

我在屏幕上显示我的谷歌广告时遇到问题

当我使用此代码时:

<div class="top-bar">
        <div class="logo">
            <a href=""><img src="FMHLogo.png" alt="Logo" border=0></a>
            <div style="top:-25;"></div>
            <script type="text/javascript">
                <!--
                google_ad_client ="ca-pub-3955111504945324";
                /* Banner */
                google_ad_slot = "6834015980";
                google_ad_width = 468;
                google_ad_height = 60;
                //-->
            </script>
            <script type="text/javascript"
            src="https://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>
        </div>

    </div>

它打破了顶部的横条div,如果我拿出

<div style="top:-25;"> 


然后,广告位于徽标旁边,但固定在顶部条形分区的底部,有什么想法吗?

将广告放在自己的分区中,并更改其
z索引。您可以将其设置为某个较高的值,如1000,或者以编程方式进行设置,以防将来页面中出现大量元素。例如:

div.google
{
    z-index: 1000; /*or do this programmatically with jQuery*/
    /*Other properties if required*/
}

你希望它怎么被占有?它应该如何以正确的方式显示?