【问题标题】:css menu under Google Ads?Google Ads 下的 CSS 菜单?
【发布时间】:2019-04-28 18:06:39
【问题描述】:

我有一个奇怪的效果:

如您所见,菜单位于 Google 横幅下方。我正在寻找可以将菜单放在横幅上的东西。你可以在www.forexvirtuel.com看到这个效果。

代码如下:

...
<div id="navigation">
    <ul id="nav">
        <li class="page_item page-item-26"><a href="http://www.forexvirtuel.com/les-calculs/" title="Les calculs">Les calculs</a>
        <ul>

            <li class="page_item page-item-33"><a href="http://www.forexvirtuel.com/les-calculs/calcul-du-rollover/" title="Calcul du Rollover">Calcul du Rollover</a></li>
            <li class="page_item page-item-31"><a href="http://www.forexvirtuel.com/les-calculs/calculs-des-gains-et-calculs-pertes/" title="Calculs des gains et calculs pertes">Calculs des gains et calculs pertes</a></li>
            <li class="page_item page-item-29"><a href="http://www.forexvirtuel.com/les-calculs/prix-d%e2%80%99un-pip-prix-d%e2%80%99un-point/" title="Prix d’un pip (prix d’un point)">Prix d’un pip (prix d’un point)</a></li>
        </ul>
    </ul>
</div>
<div id="navigation_pub">
    <script type="text/javascript"><!--
    google_ad_client = "pub-0909660115587797";
    /* Forex_Header */
    google_ad_slot = "6839564983";
    google_ad_width = 728;
    google_ad_height = 90;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
</div>
...

CSS:

#navigation
{
    clear: both;
    float: left;
    width: 930px;
    background-image: url(images/header.gif);
    height: 56px;
    padding-right: 20px;
    margin-top: 1px;
}

#navigation_pub
{
    clear: both;
    height: 90px;
    width: 930px;
    text-align:center;
    padding-top:1px;
}

知道如何将菜单放在横幅上吗?

【问题讨论】:

    标签: html css


    【解决方案1】:

    好吧,据我所知,广告稍后会出现在 DOM 中,因此自然会覆盖弹出列表。您应该可以使用z-index 覆盖它:

    #nav li ul { z-index: 1; } 
    

    【讨论】:

    • +1 和接受的答案。您对加载顺序的了解是正确的,并且您的解决方案有效。非常感谢。
    猜你喜欢
    • 2021-04-22
    • 2016-08-01
    • 2011-01-12
    • 1970-01-01
    • 1970-01-01
    • 2014-03-08
    相关资源
    最近更新 更多