Forums

How can I make the distance between posts shorter? (10 posts)

  1. virtual134
    Member
    Posted 4 years ago #

    On my web site - http://www.starkbomb.com how can I make the gap between the posts smaller? It's a huge gap right now and I can't figure out how to do it for the life of me.
    =)

  2. jonimueller
    Member
    Posted 4 years ago #

    Kill this in your template, it's not necessary unless you are trying to clear a large image or something.

    <div style="clear:both;"></div>

  3. virtual134
    Member
    Posted 4 years ago #

    took 'em all out and didn't solve it. any other ideas?

  4. jonimueller
    Member
    Posted 4 years ago #

    No, you didn't. They are still there. View your source code.

    <p class="detpost">Posted on May 4, 2008 - Filed Under <a href="http://starkbomb.com/SB_Media/uncategorized" title="View all posts in Uncategorized" rel="category tag">Uncategorized</a> </p>
    <br />

    WP must be adding them or you are hitting the ENTER key after your posts. Also check your stylesheet for

    p.detpost

    or just

    .detpost

    and take out some bottom padding or margin; that should help. But WP is throwing out line breaks after each post. I guess that's one of the pitfalls of using the WYSIWYG editor.

  5. virtual134
    Member
    Posted 4 years ago #

    Are there any other editors I can use?
    Because I got rid of all the <div style="clear:both;"></div> (except the one in the footer), and I think the code you just posted has nothing to do with it, it has 0px padding as it is. I'm completely stumped. I appreciate the help.

  6. drewactual
    Member
    Posted 4 years ago #

    if the code joni posted is accurate, it seems there is a -br- tag in there... as in line break... it is the last character quoted in the code box in his(her) post.

    root it... kill it... bye bye gap. I am not familiar with your theme, but it would reside in index.php in the versions I use, possibly the same for you.

  7. virtual134
    Member
    Posted 4 years ago #

    Here's the index.php file

    <?php get_header(); ?>
    <div id="content">
    <?php include(TEMPLATEPATH."/l_sidebar.php");?>
    <div id="contentleft">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1>" rel="bookmark"><?php the_title(); ?></h1>
    <p class="detpost">Posted on <?php the_time('F j, Y'); ?> - Filed Under <?php the_category(', ') ?> </p>
    <?php the_content(__('View'));?>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <p><?php comments_popup_link('', '1 Comment »', '% Comments »'); ?></p>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    <?php posts_nav_link(' — ', __('« go back'), __('keep looking »')); ?>
    </div>
    <?php include(TEMPLATEPATH."/r_sidebar.php");?>
    <!-- The main column ends -->
    <?php get_footer(); ?>

    see anything there?

  8. virtual134
    Member
    Posted 4 years ago #

    hmmm

  9. drewactual
    Member
    Posted 4 years ago #

    then it must be on the footer.

  10. jonimueller
    Member
    Posted 4 years ago #

    No, I think what's happening is WP is adding those line breaks when you hit "Enter" in a post. There's a plugin that takes care of that, DisableWPAutoP (disable WP auto paragraphing). That might solve your problem. BUT .. if it's the theme doing something, try switching themes and THEN viewing your source code. If the line breaks are gone, there's something in the theme templates working behind the scenes. Maddening, I know. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.