List listing not appearing correctly
9 posts by 3 authors in: Forums > CMS Builder
Last Post: August 10, 2011 (RSS)
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
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>
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
any other ideas?
Re: [degreesnorth] List listing not appearing correctly
By Jason - August 5, 2011
If you add another team record, would only the last one have a problem.
It look like a lot of your ending tags for your <table> are a little out of sync. Could you attach your .php file so we could 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
It appears in the bottom two new listings. I have attached the .php file if that helps.
Thanks
Carole
Re: [degreesnorth] List listing not appearing correctly
By Jason - August 8, 2011
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
that's not making any difference either. Any other ideas?
Thanks
Re: [degreesnorth] List listing not appearing correctly
By Jason - August 9, 2011
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
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.
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/