Jump to content

how do I put a border around each record from a table query???


dazzathedrummer

Recommended Posts

Hi,

 

I have a fairly simple list coming from a php/mysql query - I'd like to put a border around each record to make the list more readable.

 

I'm having trouble with this - if I set 'border=1' in the table tag, obviously the border goes around the whole table - I've tried putting the table in a div, but that has the same effect.

 

can anyone help me on this - i'm sure its quite simple, I just haven't got there yet.

 

 

here's my php include table: -

 

echo'
<h1>Gigs</h1>
<table width=\"605\" height=\"200\" >';
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{echo 

"
<tr>
<td style=\"height:80px; width:80px;\"valign=\"top\">
<img height=\"79px\" width=\"79px\" valign=\"top\" alt=\"calendarpic\"  style=\"position:absolute; vertical-align:top; z-index:1;\" src=\"calpics/{$row['background']}.png\"/>
<img height=\"79px\" width=\"79px\" valign=\"top\" alt=\"calendarpic1\"  style=\"position:absolute; vertical-align:top; z-index:2;\" src=\"calpics/{$row['day']}.png\"/>
<img height=\"79px\" width=\"79px\" valign=\"top\" alt=\"calendarpic2\"  style=\"position:absolute; vertical-align:top; z-index:3;\" src=\"calpics/{$row['month']}.png\"/></td>".
"<td colspan=\"3\"><font size=\"4\"><strong>{$row['gl_venue']}</td><td>{$row['gl_pf']}<br>{$row['gl_publish']}<br>{$row['gl_unavailable']}</td></tr>".
"<tr><td width=\"495\" colspan=\"3\">{$row['gl_text']}</td></tr>".
"<tr><td><b>Fee</td><td><strong>Phone</strong></td><td><b>Contact</td></tr>".
"<tr><td>{$row['gl_net']}</td><td width=\"150px\">{$row['gl_phone']}</td><td>{$row['gl_contact']}</td></tr>".
"<tr><td><strong>Comments</td></tr>".
"<tr ><td height=\"20px\" colspan=\"3\">{$row['gl_comments']}</tr></td>".
"<td colspan=\"2\"><a href=\"http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q={$row['gl_postcode']}\">Click for map</a></td><td><input type=\"submit\" value=\"edit\"></td></tr>";
}
echo '<tr style=\"height:40px\"></tr></tr></table><br><br>';
?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.