1 Replies - 10396 Views - Last Post: 10 September 2012 - 08:34 AM

#1 Switchbladed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 10-September 12

Wordpress Loop Adds a Gap?

Posted 10 September 2012 - 08:05 AM

When I add the wordpress loop inside of the div that I want it in, it adds a gap to the top of it.

You will see here:
http://sprizmo.com/garfield/wp/
a white box in the middle, and above it there is a blue gap before it turns yellow. There should be no gap. When I take out the wordpress loop it is fine, I don't know why it is doing this.

Any suggestions?

Here is the CSS:

#content {
        background:white;
	min-height:250px;
	width: 980px;
	padding-bottom:132px;
        margin:auto;
}



And the div with the loop in it:

<div id="content">

<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
  <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <div class="post-header">
        <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
        <div class="date"><?php the_time('F jS, Y') ?></div>
    </div><!--end post header-->
    <div class="entry clear">
        <?php if ( function_exists( 'add_theme_support' ) ) the_post_thumbnail(); ?>
        <?php the_content(); ?>
        <?php edit_post_link(); ?>
        <?php wp_link_pages(); ?>
    </div><!--end entry-->
    <div class="post-footer">
        <div class="comments"><?php comments_popup_link( 'Leave a Comment', '1 Comment', '% Comments' ); ?></div>
    </div><!--end post footer-->
  </div><!--end post-->
<?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
  <div class="navigation index">
    <div class="alignleft"><?php next_posts_link( 'Older Entries' ); ?></div>
    <div class="alignright"><?php previous_posts_link( 'Newer Entries' ); ?></div>
  </div><!--end navigation-->
<?php else : ?>
<?php endif; ?>

</div>


Is This A Good Question/Topic? 0
  • +

Replies To: Wordpress Loop Adds a Gap?

#2 Switchbladed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 10-September 12

Re: Wordpress Loop Adds a Gap?

Posted 10 September 2012 - 08:34 AM

Fixed it by adding
margin-top:-16px;
under #content
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1