• I want to put lines between my posts on main page, like this:

    Image

    Currently in index.php is:

    <table cellpadding="20" cellspacing="20" border="0"> 
    
    <?php
    $col = 0;
    $cols_per_row = 2;
    while (have_posts()) : the_post();
      if($col == 0) echo '<tr>';
      ?>
      <td class="column'<?php echo $col; ?>" style="vertical-align: top">
      <div class="post" id="post-'<?php the_ID(); ?>'">
    	<b><h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></b>
    	<div class="descr"><?php the_time('l, F jS Y, G:i a T'); ?></div>
    	<div class="entry">
    	  <?php the_content('Read the rest of this entry &raquo;'); ?>
    <a href="<?php the_permalink(); ?>"
    <img src="http://www.tamileelamonline.com/wp-content/uploads/fullstory1.png" ALIGN="right" WIDTH="95" HEIGNT= "40" />
    </a>
    	</div>
    
    <br /><br /><br />
      </div>
      <td>
      <?php
      if($col++ >= $cols_per_row){
    	$col = 0;
    	echo '</tr>';
      }
    endwhile;
    ?>
    
    </TD>
    </table>
Viewing 8 replies - 1 through 8 (of 8 total)
  • A link to your site might help…

    Thread Starter gavin5491

    (@gavin5491)

    Your posts already have borders at the bottom. And bottom margins. What else is it that you want?

    Thread Starter gavin5491

    (@gavin5491)

    Basically what you see is a background on the table:

    <table cellpadding="20" cellspacing="20" border="0" background="http://www.tamileelamonline.com/wp-content/uploads/lines3.png">

    So when the post changes, the lines get close, like this

    Try edting style.css and changing:

    .post {
    margin:6px 0 2px;
    }

    to:

    .post {
    height:350px;
    margin:6px 0 2px;
    border-bottom:1px solid #ccc;
    }
    Thread Starter gavin5491

    (@gavin5491)

    Thank you very much!

    Is it possible to put a Vertical line?

    border-left and border-right can be used in the same way as border-bottom.

    hello
    I am using wordpress 3.0.1 desciple theme

    I just added

    .post {
    margin-bottom: -25px;
    }
    at the end of my style sheet to reduce space between posts. I will love to add lines between posts too.

    I added
    border-bottom:1px solid #000;
    after margin-bottom: -25px;
    and the result is two lines, wheras i just need one line

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Adding Lines between Posts’ is closed to new replies.