English 中文(简体)
CSS 谷歌定位
原标题:CSS Google Ad positioning

我对在上展示我的Google广告有异议,“http://www.freeMinecraftHost.com” rel=“nofollow”>www.freeMinecraftHost.com

当我使用这个代码时:

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

然后广告就贴在徽标旁边, 却被钉在顶层Div的底部, 有什么想法吗?

最佳回答

将广告放在自己的 div 中, 并更改其 z- index 。 您可以将其设置为1000 这样的高值, 或者用程序设置它, 以防您的页面在未来出现很多元素 。 例如 :

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

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签