List listing not appearing correctly

9 posts by 3 authors in: Forums > CMS Builder
Last Post: August 10, 2011   (RSS)

Can't seem to work this one out. I have a listing page at http://www.focus10.com.au/about_us.php and so far, all of the listing summaries appear in the right spot. Now I've added an additional one, and it's pushing out the page. Any ideas what's causing this?

This is the code I am using:

<table border="0" bordercolor="#FFFFFF" style="background-color:#FFFFFF" width="671" cellpadding="4" cellspacing="4">
<tr>
<td class="body" valign="top" width="158">

<p class="coursename">

<?php foreach ($teamRecords as $record): ?><p class="coursename"><?php echo $record['title'] ?><br>
<p class="subhead2"><?php echo $record['position_title'] ?><br>
</p>


</td>
<p>
<td class="body" valign="top" width="485">
<p style="text-align: left"><?php echo $record['bio'] ?><tr>
<td class="body" valign="top" style="border-bottom: 1px solid #3A7190" colspan="2">
<img border="0" src="images/7h.gif" width="1" height="7"></td>
<tr>
<td class="body" valign="top" colspan="2">
<img border="0" src="images/7h.gif" width="1" height="7"></td>
<TR>
<TD class="body" valign="top" valign="top">


<?php endforeach ?>

<?php if (!$teamRecords): ?>
<br/>
<?php endif ?>
</td>



</TABLE>




Any help would be greatly appreciated.

Thanks

Re: [degreesnorth] List listing not appearing correctly

By Damon - August 4, 2011

Hi,

With tables, I general have the starting <table> tag and ending </table> tag outside the foreach loop and everything else, inside the loop.

Try this code:
<table border="0" bordercolor="#FFFFFF" style="background-color:#FFFFFF" width="671" cellpadding="4" cellspacing="4">
<?php foreach ($teamRecords as $record): ?>
<tr>
<td class="body" valign="top" width="158"><p class="coursename">
<p class="coursename"><?php echo $record['title'] ?><br>
<p class="subhead2"><?php echo $record['position_title'] ?><br>
</p></td>
<td class="body" valign="top" width="485"><p style="text-align: left"><?php echo $record['bio'] ?></p></td>
</tr>
<tr>
<td class="body" valign="top" style="border-bottom: 1px solid #3A7190" colspan="2"><img border="0" src="images/7h.gif" width="1" height="7"></td>
<tr>
<td class="body" valign="top" ><img border="0" src="images/7h.gif" width="1" height="7"></td>
<tr>
<td colspan="2">
<?php if (!$teamRecords): ?>
<br/>
<?php endif ?></td>
</tr>
<?php endforeach ?>
</table>

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Damon] List listing not appearing correctly

That hasn't made any difference at all. The tables were working fine until I added the last listing, then it all went pear shape.

any other ideas?

Re: [Jason] List listing not appearing correctly

Hi Jason
It appears in the bottom two new listings. I have attached the .php file if that helps.
Thanks
Carole
Attachments:

about_us_001.php 26K

Re: [degreesnorth] List listing not appearing correctly

By Jason - August 8, 2011

Hi Carole,

It looks like some of your <tr> tags aren't getting closed before new <tr> tags are opening. Try these changes:

<table border="0" bordercolor="#FFFFFF" style="background-color:#FFFFFF" width="671" cellpadding="4" cellspacing="4">
<?php foreach ($teamRecords as $record): ?>
<tr>
<td class="body" valign="top" width="158">
<p class="coursename">
<p class="coursename"><?php echo $record['title'] ?><br>
<p class="subhead2"><?php echo $record['position_title'] ?><br>
</p>
</td>
<td class="body" valign="top" width="485"><p style="text-align: left"><?php echo $record['bio'] ?></p></td>
</tr>
<tr>
<td class="body" valign="top" style="border-bottom: 1px solid #3A7190" colspan="2"><img border="0" src="images/7h.gif" width="1" height="7"></td>
</tr>
<tr>
<td class="body" valign="top" ><img border="0" src="images/7h.gif" width="1" height="7"></td>
</tr>


<?php if (!$teamRecords): ?>
<tr>
<td colspan="2">

<br/>
</td>
</tr>
<?php endif ?>

<?php endforeach ?>
</table>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] List listing not appearing correctly

Hi Jason

that's not making any difference either. Any other ideas?

Thanks

Re: [degreesnorth] List listing not appearing correctly

By Jason - August 9, 2011

Hi,

It's possible the issue could be caused by extra HTML inside the content of that last record. If you create a new test record, or rearrange the order of your records, is only that 1 record affected by the issue?

Take a look a the HTML content of that record and see if there is anything extra in there. If not, you can fill out a [url http://www.interactivetools.com/support]2nd Level Support Request[/url] and we'll take a look.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] List listing not appearing correctly

By Damon - August 10, 2011

The issue is now resolved.

Tuned out it was extra table code entered in the WYSIWYG editor that was causing problems.

Click the "HTML" button to see the source of the WYSIWYG editor code if ever need to check it.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/