doukui9491 2010-09-05 10:56
浏览 62
已采纳

CSS覆盖问题 - AdSense块覆盖我的代码(包含屏幕截图)

I've updated my theme at my main site, TweaksForGeeks.com, but as you can see in the image below I'm having an issue with my bottom AdSense block.

alt text

The AdSense block overlays the tags if it is an article that has enough tags (or long enough ones) to use more than one line. It looks proper if the tags are all on just one line.

I've fiddled with it a bit, and this block is set outside the tags div block, so I've no idea why it's doing this. Any ideas?

The offending page example is here. Code is below.

CSS code is as follows:

#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; }

Page code is:

<div class="post-meta"><?php the_tags( __( '<span class="tag-links">Tags: ', 'wpbx' ), ", ", "</span>
" ) ?></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>
  • 写回答

1条回答 默认 最新

  • douju4278 2010-09-05 11:31
    关注

    You'll need to remove the height property from the .tag-links ruleset, and add clear: both to the #bottom-adsense div.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效