【问题标题】:CSS Overlay Issue - AdSense Block lays over my tags (Screenshot included)CSS 覆盖问题 - AdSense 块覆盖我的代码(包括屏幕截图)
【发布时间】:2010-09-05 19:31:00
【问题描述】:

我已在我的主站点 TweaksForGeeks.com 上更新了我的主题,但正如您在下图中看到的那样,我的底部 AdSense 块有问题。

如果文章有足够多的标签(或足够长的标签)以使用多行代码,则 AdSense 块会覆盖标签。如果标签都在一行上,它看起来很合适。

我稍微摆弄了一下,这个块设置在标签 div 块之外,所以我不知道它为什么这样做。有什么想法吗?

违规页面示例是here。代码如下。

CSS代码如下:

#bottom-adsense {
    width:  468px;
    height: 60px;
    padding-top: 2px;
    padding-bottom: 0px;
    margin-left: auto;
    margin-right: auto; }

    .post .post-meta {
    font-size: 10px;
    text-transform: uppercase;
    float: left;
    clear: both; }

    .rightn small a, .post-meta a {
    font-size: 10px;
    font-family: Arial;
    color: #737373; }

    .rightn small, .post-meta {
    font-size: 10px;
    font-family: Arial;
    color: #737373;
    text-transform: uppercase; }

页面代码是:

<div class="post-meta"><?php the_tags( __( '<span class="tag-links">Tags: ', 'wpbx' ), ", ", "</span>\n" ) ?></div>

                <div id="bottom-adsense">
                        <script type="text/javascript"><!--
                                google_ad_client = "MY_PUB_ID";
                                /* 468x60 - Post Bottom */
                                google_ad_slot = "8415056823";
                                google_ad_width = 468;
                                google_ad_height = 60;
                                //-->
                        </script>
                        <script type="text/javascript"
                                src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                        </script>
                </div>

    <div id="socialicons">
        <ul>
            <li><a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/twitter.png" alt="Tweet This!" />Tweet This</a></li>
            <li><a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" rel="external,nofollow" target="_blank"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/facebook.png" alt="Share on Facebook" />Share on Facebook</a></li>
            <li><a href="http://digg.com/submit?phase=2&url=<?php the_permalink();?>&title=<?php the_title();?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/digg.png" alt="Digg it!" />Digg This</a></li>
            <li><a href="http://del.icio.us/post?v=4&noui&jump=close&url=<?php the_permalink();?>&title=<?php the_title();?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/delicious.png" alt="Add to Delicious!" />Save to delicious</a></li>
            <li><a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/stumble.png" alt="Stumble it" />Stumble it</a></li>
            <li><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/feed.png" alt="Subscribe by RSS" />RSS Feed</a></li>
        </ul> 
    </div>

【问题讨论】:

  • 它不是页面代码。这是PHP代码。而PHP与页面布局无关。改为提供 HTML 代码

标签: php html css


【解决方案1】:

您需要从.tag-links 规则集中删除height 属性,并将clear: both 添加到#bottom-adsense div。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-09
    • 1970-01-01
    • 2022-10-06
    • 2021-01-12
    相关资源
    最近更新 更多