Table Problem
by "C. Reeve" <creeve.2005(at)rogers.com>
|
Date: |
Wed, 9 Jul 2003 01:39:58 -0400 |
To: |
"HWG Basics" <hwg-basics(at)hwg.org> |
|
todo: View
Thread,
Original
|
|
Hi,
I guess the best way to start is to give you the link so you can see
what I'm talking about.
http://hockey-pool-test.homedns.org:800/messages/information.php
On the graphic that says Posted By you will see a small blue line above
it. This should not be there. On the following boxes there is a straight
black line near the top (which is also a graphic). This should be right
at the top with nothing above it. I know why they're there, but not sure
how to fix it.
I have used nested tables - in the first part of the table there is a
background image - which is what you are seeing above the Posted By and
the Black Line. I know I'm close, but obviously just missing something.
I have pasted the relevant code below. Note that there is PHP code as I
am using a MySQL database to retrieve some data. I hope I have explained
this enough.
Thanks for any help.
C. Reeve
$color = 1;
$first = 1;
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
if($first == 1) { $top = "images/postedby.gif WIDTH=720
HEIGHT=25"; }
else { $top = "images/topmessage.gif WIDTH=720
HEIGHT=4"; }
if ($color %2 == 0) { $row = "images/bg-lite.gif"; $bot
= "images/bottom-l.gif"; }
else { $row = "images/bg-dark.gif"; $bot =
"images/bottom-d.gif"; }
echo "<TABLE ALIGN=center WIDTH=720 HEIGHT=5
cellpadding=0 cellspacing=0 background=".$row.">\n";
echo "<TR valign=top><TD><IMG SRC=".$top." BORDER=0>\n";
echo "</TD></TR>\n";
echo "<TR><TD>\n";
echo "<TABLE ALIGN=center WIDTH=670 HEIGHT=25
cellpadding=0 cellspacing=0 BORDER=0>\n";
echo "<TR valign=top>\n";
echo "<TD>\n";
echo $line['name']."<BR>";
echo $line['date']."<BR>";
echo $line['notes']."<BR>";
echo "</TD></TR></TABLE>";
echo "</TD></TR>\n";
echo "<TR><TD>\n";
echo "<TABLE ALIGN=center WIDTH=670 HEIGHT=11
cellpadding=0 cellspacing=0 BORDER=0>\n";
echo "<TR><TD><IMG SRC=".$bot." WIDTH=720 HEIGHT=11
BORDER=0></TD></TR>";
echo "</TABLE>";
echo "</TD></TR></TABLE>";
echo "<TABLE WIDTH=720>";
echo "<TR>\n";
echo "<TD HEIGHT=15>\n";
echo "</TD></TR></TABLE>";
$color = $color + 1;
$first = 0;
}
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA