• Resolved planky

    (@planky)


    I don’t know what is causing this, but I have the following to display posts in my template:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <TABLE style="WIDTH: 100%; TEXT-ALIGN: left" cellSpacing=0 cellPadding=0
    border=0>
      <TBODY>
      <TR>
        <TD style="VERTICAL-ALIGN: top" rowSpan=2>
        	<A href="<?php echo get_post_meta($post->ID, "Image", $single = true); ?>">
        		<IMG height=141 alt=Chance src="<?php echo get_post_meta($post->ID, "Thumbnail", $single = true); ?>" width=134>
        	</A><BR />
          	<STRONG>Price: <?php echo get_post_meta($post->ID, "Price", $single = true); ?></STRONG><BR />
         	<STRONG>IAR: <?php echo get_post_meta($post->ID, "IAR", $single = true); ?></STRONG>
        </TD>
        <TD style="VERTICAL-ALIGN: top" rowSpan=3>
           		<div class=storycontent>
    				<div class="post" id="post-<?php the_ID(); ?>">
    					<h2 class="storytitle">..:: <a href="<?php the_permalink() ?>"><?php the_title(); ?></a> ::..</h2><br />
    					<div class="storycontent">
    					   <?php the_content(__('(more...)')); ?>
                        </div>
                    </div>
                </div>
         </TD>
      </TR>
      </TBODY>
    </TABLE>
    
    <?php endwhile; else: ?>
    <?php endif; ?>

    When I review the resulting html, it has moved the three </div> from after the_content to after </table>. It also duplicates the closing tags for the table:

    <TABLE style="WIDTH: 100%; TEXT-ALIGN: left" cellSpacing=0 cellPadding=0 
    
    border=0>
      <TBODY>
      <TR>
        <TD style="VERTICAL-ALIGN: top" rowSpan=2>
        	<A href="fs_chance.jpg">
        		<IMG height=141 alt=Chance src="fs_thb_chance.jpg" width=134>
        	</A><br />
          	<STRONG>Price: $10,000 + GST</STRONG><br />
          	<STRONG>IAR: 126614</STRONG>
        </TD>
        <TD style="VERTICAL-ALIGN: top" rowSpan=3>
           		<div class=storycontent>
    				<div class="post" id="post-38">
    					<h2 class="storytitle">..:: <a href="https://planky.dyndns.org/?p=38">Willowbank Chance</a> ::..</h2><br />
    					<div class="storycontent">
    					   <p>Born March 2007, Chance has outstanding potential as a stud male. His pedigree  combines the best of Australian, American and Accoyo bloodlines, featuring animals such as Purrumbete Inti, Purrumbete Ledgers Dream,  (Australia) Peruvian Hemingway, ILR PPeruvian Allin Capac (USA) and a descendant of top Accoyo Stud Shere Khan. His NZ parentage includes Benleigh Moon Shine and Alpine Fibers Brutus. You can’t get better than this!</p>
    <p><strong>Performance:</strong> His show career includes winning the Junior Male(Brown) at The Manawatu Royal Event A&amp;P Show in November 2007, where the Judge,Lyn Dickson (Australia) particularly commented on Chance’s lack of medullation (guard hair).</p>
    <p><strong>Potential:</strong> Chance has the potential to become a top stud - his fibre statistics were 18.56 μ, SD3.69, CV 19.91% - his conformation and fibre statistics easily fit British import standards, making him eligible for export from NZ to most countries. A light brown, Chance is a great opportunity to introduce quality colour genetics to your herd. </p>
    <p> </td>
    </tr>
    </tbody>
    </table>
                        </div>
                    </div>
                </div>
         </TD>
      </TR>
      </TBODY>
    </TABLE>

    Just a bit lost as to what I have done to cause this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter planky

    (@planky)

    errant code in the post was causing it ??

    Hey,

    It’s not actually moving the <div>‘s. It’s inserting extra code after the post:

    <p>
    </td>
    </tr>
    </tbody>
    </table>

    It turns out have the extra code in your post, not in the page template.

    I know this because you checked and told me ?? I’m just answering the question here in case anyone else comes along with the same problem. There’s nothing more annoying then help questions without the solution! ??

    Which you did doh! ?? You’re a good man.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘DIV tags moved, duplicate tags’ is closed to new replies.