【问题标题】:CSS: float:right not working correctlyCSS:浮动:正确无法正常工作
【发布时间】:2014-06-28 20:53:49
【问题描述】:

我有flash游戏网站,想在游戏左右两边加googleadsense广告。我在左边做得很好,但我不能在右边做。我尝试了所有方法,例如 div adss2 我尝试了右浮动等。请帮助我

这是工作代码,只有左侧广告

#adss {
float: left;
}

<div id="adss"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- FBHG 160 x 600 Left & Right -->
<ins class="adsbygoogle"
     style="display:inline-block;width:120px;height:600px"
     data-ad-client="ca-pub-6986007787043433"
     data-ad-slot="8913466265"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
                    <div id="playgame">
                        <script type="text/javascript">
                        <!--
                        swf("<?php $values = get_post_custom_values("game"); echo $values[0]; ?>", "701", "550");//-->
                        </script>
                    </div>      
                    <div class="gamecontent">
                        <h3><?php _e("How To Play", "freebabyhazelgames"); ?>:</h3>
                        <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
                    </div>

这就是广告的展示方式

这就是我想要的样子

<div id="adss2"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- FBHG 160 x 600 Left & Right -->
<ins class="adsbygoogle"
     style="display:inline-block;width:120px;height:600px"
     data-ad-client="ca-pub-6986007787043433"
     data-ad-slot="8913466265"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>

上面是第二个html。

【问题讨论】:

  • 第二个广告 div 的 HTML 在哪里?
  • 我添加了 :) 我在 swf("", "701", " 550");//-->
  • 把它放在 swf 之前。
  • 嘿嘿!!!谢谢 :) 将其添加为答案,我会通过你
  • 这个问题与 PHP 无关。请避免标签垃圾邮件。
  • 标签: html css wordpress adsense


    【解决方案1】:

    使用此代码

    <div id="adss"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- FBHG 160 x 600 Left & Right -->
    <ins class="adsbygoogle"
         style="display:inline-block;width:120px;height:600px"
         data-ad-client="ca-pub-6986007787043433"
         data-ad-slot="8913466265"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script></div><div id="adss2"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- FBHG 160 x 600 Left & Right -->
    <ins class="adsbygoogle"
         style="display:inline-block;width:120px;height:600px"
         data-ad-client="ca-pub-6986007787043433"
         data-ad-slot="8913466265"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script></div>
                        <div id="playgame">
                            <script type="text/javascript">
                            <!--
                            swf("<?php $values = get_post_custom_values("game"); echo $values[0]; ?>", "701", "550");//-->
                            </script>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-02
      相关资源
      最近更新 更多