views:

71

answers:

1

Hi everyone. I am designing a site with wordpress. My index page keeps posting news items side by side, and nomatter how I try to modify my code, it will not place a break between the two.

To see what I mean, visit www.acacians.net.

Here is the chunk of code in my template that controls the "News Post" portion of the page:


<table width="760" border="0" align="center" cellpadding="10" cellspacing="0" background="wp-content/themes/DarlingTemplate/images/tablebg.jpg">
  <tr>
    <td>
    <table width="530" border="0" align="left" cellpadding="10" cellspacing="0" bgcolor="#f4f3f0">
        <tr><?php if (have_posts()) : while (have_posts()) : the_post(); ?>
          <td><table width="530" border="0" cellspacing="0" cellpadding="5">
            <tr>
              <td width="30" height="30"><img src="wp-content/themes/DarlingTemplate/images/category.jpg" /></td>
              <td background="wp-content/themes/DarlingTemplate/images/subjbg.jpg"><strong><?php the_title(); ?></strong><br />
              Posted on <?php the_time('F jS, Y') ?>
        </td>
       </tr>
      </table>
<table width="530" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td width="5"></td>
    <td width="505"><?php the_content(__('(more...)')); ?>
  </tr>
</table>

<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?><p>
<?php endif; ?>       
    </td>
  </td>
 </tr>
</table>            


I have tried inserting a break at the end of every line, and then refreshing my page. Why isn't this working?

I appreciate any help that can be offered.

Thank you so much!!!!

A: 

it's because you are printing all of the posts into the same tag.

A larger problem though is that you are using nested tables in your layout.

GSto
I know that it's "wrong" to nest tables, I just never learned any differently. Two questions:1.) If I go about doing this differently than table nesting, will it fix my problem?2.) What other methods should I learn in order to correct the table nesting?
gritts
You're after CSS layouts
adam
Any tips / good places to go?
gritts
http://articles.sitepoint.com/article/rock-solid-css-layouts
adam
Solid! Thank you so much.
gritts