WordPress.org

Forums

Arranging posts problem (3 posts)

  1. leema01
    Member
    Posted 4 years ago #

    Hey i am using this code to display post excerpts on my home page

    <div class="postarray">
    <a class="posttitle" title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
    <p class="meta"> <?php the_time('jS F Y') ?>//<?php the_category(', ') ?>//<?php the_author(); ?></p>
    <?php the_post_thumbnail(array(300,9999), array ('class' => 'alignleft')); ?>
    <p class="thumbtext"><?php the_excerpt(); ?> </p>
    <div class="clear"></div>
    </div>

    This is my css

    .postarray {width: 300px;height: auto;padding: 5px;border-bottom: solid 1px black;margin: 10px;vertical-align: baseline;float: left;display: block; }

    i cant seem to get my posts to align like this >>
    http://f.cl.ly/items/331l1l171a2S253N2T0p/Screen%20shot%202011-08-04%20at%2001.39.14.png

    Any help would be appreciated , Thanks Matt

  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

    imho, there is no way that a simple float will do this;

    have a look at: http://www.transformationpowertools.com/wordpress/playing-with-columns-stacking-posts-grid-style

    applied to your code, this could look like:
    'stacked posts in a grid'

    http://pastebin.com/aDe9D8wz

  3. leema01
    Member
    Posted 4 years ago #

    Hero! , this has been puzzling me for hours and hours i even looked into overriding css to absolute position each post in a custom field!

    Thanks again

    Matt

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags