• Resolved konzine

    (@konzine)


    Hello,

    I am having a bit of an issue here. I believe I am screwing up my div tags considerably. Here is a picture of what I am working with :

    Click here..

    Now, the blue area is the date/time. The first post there is correct, right to the left of the title. But with the latter two posts, it all goes haywire. Here is the actual Loop :

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <div id="left">
    <?php the_time('F jS, Y'); ?>
    </div>
    <div id="right">
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    <?php the_excerpt(); ?>
    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    
    <?php endif; ?>
    </div>
    </div>

    Looks ok to me but I may be wrong who knows.

    And here is my CSS “div” code :

    #container {
    width: 644px;
    margin: 10px auto 0 auto;
    text-align: left;
    border: 0px solid #000000;
    }
    
    #left {
    width: 100px;
    background-color: blue;
    float: left;
    }
    
    #right{
    width: 544px;
    float: right;
    }

    The entire loop is wrapped in the container div, which is the entire length of the page and the length of both latter divs together.

    If anyone has any ideas please let me know. Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter konzine

    (@konzine)

    Well, I resolved the issue by myself. Sometimes you just have to mess around with code placement :P. For ANYONE who wanted to know, here is the correct coding for this :

    <div id="right">
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    <?php the_excerpt(); ?><br />
    </div>
    <div id="left">
    <?php the_time('F jS, Y'); ?>
    </div>
    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    </div>
Viewing 1 replies (of 1 total)

The topic ‘“<div>” Issues : Location, Location…Location…’ is closed to new replies.