Support » Fixing WordPress » Twenty Ten Theme – TextScrolling round Google Ads

  • Resolved technonow


    I’m using WordPress 3.0 and a child theme based on the default twenty ten theme.

    On my page.php I’ve coded in a google ad and I was expecting the text to scroll round it, but it isn’t. I don’t want to use a Plugin.

    Knowing me, I’m probably missing something obvious!

    Can anyone please help by telling me what I’ve done wrong?

    My site is at and my page.php code is as follows:

    <div id="container">
    	<div id="content" role="main">
    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<?php if ( is_front_page() ) { ?>
    		<h2 class="entry-title"><?php the_title(); ?></h2>
    	<?php } else { ?>
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    	<?php } ?>				
    	<div class="entry-content">
    	<div id="googleads" style="float:right;margin:12px;">
    		<script type="text/javascript"><!--
    		google_ad_client = "pub-xxxxxxxxxx";
    		/* 250x250 top square, created 6/21/10 */
    		google_ad_slot = "0905491855";
    		google_ad_width = 250;
    		google_ad_height = 250;
    		<script type="text/javascript"
    	<?php the_content(); ?
    	<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
    	<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Strange. On some pages the text is scrolling correctly, whilst on others it isn’t!



    Forum Moderator

    those articles, where it does not work, start with a h3 title.

    this style in style.css of the theme seems responsible:

    h1, h2, h3, h4, h5, h6 {
    	font-weight: normal;
    	clear: both;

    the ‘clear:both;’ stops the title from being affected by ‘floating’ divs.

    taking h3 out of this style soves your problem.

    however, these styles might be there for a good reason (or maybe not), and changing them could have side effects somewhere else on the site, or in certain situations.

    Thanks for that. Just what I needed to know. Much obliged.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Twenty Ten Theme – TextScrolling round Google Ads’ is closed to new replies.