Page 1 of 1

Table Background

Posted: Mon May 31, 2004 12:58 pm
by AlbinoJellyfish
I am trying to create a news script that will have a image, with text over it for the title. The image does not work.

Code: Select all

<?PHP 
$db = mysql_connect("blah"); 
mysql_select_db("seven" , $db) or die("Couldn't open $db: ".mysql_error()); 
$query = "SELECT * FROM sevennews"; 
$result=mysql_query($query); 
while ($row = mysql_fetch_array($result)){ 
?><td width="330" height="13" background="bar_dark.gif" valign="top">
              <p style="margin-left: 45; margin-top: 0; margin-bottom: 0"><b><font color="#000000">
			  <?
echo $row['date'];
echo ' - ';
echo $row['description'];
echo '</font></b></p>
            </td>
          </tr>
          <tr>
            <td width="330" height="52" valign="top">
              <p style="text-indent: 20">';
echo $row['story'];
echo  '         </tr>
          <tr>
            <td width="330" height="8" valign="middle" align="right">
              <p style="text-indent: 0; margin-left: 0; margin-right: 25; margin-top: 0; margin-bottom: 0"><b>';
echo $row['author'];
echo ' </b></td>
          </tr>';
}

?>
How come the image doesnt display in the background of a cell?

Posted: Mon May 31, 2004 1:04 pm
by Weirdan

Posted: Mon May 31, 2004 1:11 pm
by AlbinoJellyfish
Problem Solved.

Posted: Mon May 31, 2004 1:25 pm
by AlbinoJellyfish
nvm
i need a banned title

im retarded.

Posted: Mon May 31, 2004 1:28 pm
by Paddy
It is very early morning here but shouldn't

background="bar_dark.gif"

be

background="images/bar_dark.gif"

?

Posted: Mon May 31, 2004 3:43 pm
by AlbinoJellyfish
na, i forgot to make a table row to put the stuff into... if you look at the code you will see no <tr> after i make the table...