![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Feb 2005
Posts: 47
Rep Power: 0
![]() |
HTML Tables and IE
EDIT: Don't I feel stupid...I'd missed some >s off the end of some tags...disregard this post! Sorry!
Hi. I have the following page: http://herp.awardspace.com/redesign/...p?page=species The page this shows inside a template is http://herp.awardspace.com/redesign/species.php The table shows up fine in FireFox, but messed up in IE... Here's the code for it: echo "<table width='90%' border='0' align='center' cellpadding='1' cellspacing='0'>
<tr>
<td width='35%' valign='top'><strong>Common Name</strong></td>
<td width='38%' valign='top'><strong>Scientific Name</strong></td>
<td width='27%' valign='top'><strong>Category</strong></td>
</tr>";
if($rowNum % 2 != 0){
echo "<tr bgcolor='#00CC66'>
<td width='35%'><a href=animal.php?id=".$row['id'].">".$row['common_name']."</a></td
<td width='38%'>".$row['scientific_name']."</td>
<td width='27%'>".$category."</td>
</tr>";
} else {
echo "<tr>
<td width='35%'><a href=animal.php?id=".$row['id'].">".$row['common_name']."</a></td
<td width='38%'>".$row['scientific_name']."</td>
<td width='27%'>".$category."</td>
</tr>";
}
$rowNum++;
}
echo "</table>";It's in php. The first echo statement puts the html to start the table and make the first row of the table. Then an if statement checks if the row is odd or even and prints out the next line of the table. Then at the end a </table> tag is written to close the table. Does anyone know why this wont work in IE? Thanks. Last edited by gj15987; Feb 8th, 2007 at 2:44 PM. |
|
|
|
|
|
#2 |
|
Newbie
|
looks right to me -- what is wrong with it?
|
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Read his EDIT at the top of the post....
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HTML Tables -- Only One Border Showing | Intimidat0r | HTML / XHTML / CSS | 10 | Apr 5th, 2006 7:45 AM |
| Getting Info From an HTML File | jonnymp316 | Perl | 3 | Jul 3rd, 2005 10:20 AM |
| unknown gap between tables | epswing | HTML / XHTML / CSS | 8 | Jun 6th, 2005 3:55 AM |
| Using tables with css | dmorales | HTML / XHTML / CSS | 17 | Apr 14th, 2005 12:01 AM |
| Making Tables With <div> Tags | You Like Java? | HTML / XHTML / CSS | 8 | Mar 22nd, 2005 1:41 PM |