Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 8th, 2007, 2:34 PM   #1
gj15987
Programmer
 
Join Date: Feb 2005
Posts: 47
Rep Power: 0 gj15987 is on a distinguished road
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.
gj15987 is offline   Reply With Quote
Old Feb 12th, 2007, 8:47 PM   #2
matthewvb
Newbie
 
matthewvb's Avatar
 
Join Date: Sep 2006
Posts: 23
Rep Power: 0 matthewvb is on a distinguished road
Send a message via AIM to matthewvb
looks right to me -- what is wrong with it?
__________________
matthewvb
www.matthewvb.com
matthewvb is offline   Reply With Quote
Old Feb 12th, 2007, 9:47 PM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:16 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC