Gavin5491
Member
Posted 2 years ago #
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 »'); ?>
<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>
A link to your site might help...
Gavin5491
Member
Posted 2 years ago #
Your posts already have borders at the bottom. And bottom margins. What else is it that you want?
Gavin5491
Member
Posted 2 years ago #
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;
}
Gavin5491
Member
Posted 2 years ago #
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