我在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的底部,有什么想法吗?
发布于 2012-05-26 18:12:46
将广告放在自己的div中,并更改其z-index。您可以将其设置为某个较高的值,如1000,或者以编程方式设置它,以防您的页面在将来包含大量元素。例如:
div.google
{
z-index: 1000; /*or do this programmatically with jQuery*/
/*Other properties if required*/
}https://stackoverflow.com/questions/10763273
复制相似问题