Title: Adding Lines between Posts
Last modified: August 19, 2016

---

# Adding Lines between Posts

 *  [gavin5491](https://wordpress.org/support/users/gavin5491/)
 * (@gavin5491)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/)
 * I want to put lines between my posts on main page, like this:
 * [Image](http://www.tamileelamonline.com/wp-content/uploads/dfgdfg.jpg)
 * 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)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/#post-1424461)
 * A link to your site might help…
 *  Thread Starter [gavin5491](https://wordpress.org/support/users/gavin5491/)
 * (@gavin5491)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/#post-1424463)
 * Hi, here you go:
 * [http://www.tamileelamonline.com/](http://www.tamileelamonline.com/)
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/#post-1424467)
 * Your posts already have borders at the bottom. And bottom margins. What else 
   is it that you want?
 *  Thread Starter [gavin5491](https://wordpress.org/support/users/gavin5491/)
 * (@gavin5491)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/#post-1424473)
 * 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](http://www.tamileelamonline.com/wp-content/uploads/qwaes.png)
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/#post-1424481)
 * 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](https://wordpress.org/support/users/gavin5491/)
 * (@gavin5491)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/#post-1424488)
 * Thank you very much!
 * Is it possible to put a Vertical line?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/#post-1424491)
 * `border-left` and `border-right` can be used in the same way as `border-bottom`.
 *  [lionnes](https://wordpress.org/support/users/lionnes/)
 * (@lionnes)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/#post-1424857)
 * 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.

## Tags

 * [adding](https://wordpress.org/support/topic-tag/adding/)
 * [between](https://wordpress.org/support/topic-tag/between/)
 * [lines](https://wordpress.org/support/topic-tag/lines/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * 8 replies
 * 3 participants
 * Last reply from: [lionnes](https://wordpress.org/support/users/lionnes/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/adding-lines-between-posts-2/#post-1424857)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
