Posts in 3 or 4 columns
-
I would like to have three or four columns instead of two.
What do I change to the following code?
<table cellpadding="0" cellspacing="0" border="0"> <?php $column = 1; ?> <?php while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?> <?php if ($column == 1) echo "<tr>"; ?> <td class="column<?php echo $column;?>" style="vertical-align: top">
</td> <?php if ($column == 2) echo "</tr>"; (($column==1) ? $column=2 : $column=1); ?> <?php // END of the LOOP endwhile; ?> </table>
CSS code:
.column {width: 50%;}
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Posts in 3 or 4 columns’ is closed to new replies.