I'm using PHP to piece together photos on my website. I have the pieces in the correct order, but there is white space between each photo. At the moment, the only Css I have is placing the black border around the specified outer edges of the photo - I added this after the white space problem, so I can't think that it affects it.

Could anyone suggest how to correct this issue?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Equine Focus</title>
<link rel="stylesheet" type="text/css" href="/style/20090330.css"/>



	// 	Connects to your Database  

		mysql_connect("*****", "*****", "*****") or die(mysql_error());  
		or die ("Unable to connect to MySQL");

	// mysql

		$data = mysql_query("SELECT * FROM `photos` WHERE date = '2009-03-21' AND ref ='001'") or die 
		("No data available, please contact the site admin describing where you found this error message.");  

<table align='center' border='0' padding='0' spacing='0'>

		while($info = mysql_fetch_array($data)) {  
	// images


	// ref

		$ref = $info['date'].'-'.$info['ref'];

	// write-up
		$text=$info['horse'].' ridden by '.$info['rider'];

        <td><div id='image1'><img src="<?php echo $image1; ?>"</a></div></td>
        <td><div id='image2'><img src="<?php echo $image2; ?>"</a></div></td>
        <td><div id='image3'><img src="<?php echo $image3; ?>"</a></div></td>
        <td><div id='image4'><img src="<?php echo $image4; ?>"</a></div></td>

        <td><div id='image5'><img src="<?php echo $image5; ?>"</a></div></td>
        <td><div id='image6'><img src="<?php echo $image6; ?>"</a></div></td>
        <td><div id='image7'><img src="<?php echo $image7; ?>"</a></div></td>
        <td><div id='image8'><img src="<?php echo $image8; ?>"</a></div></td>

        <td><div id='image9'><img src="<?php echo $image9; ?>"</a></div></td>
        <td><div id='image10'><img src="<?php echo $image10; ?>"</a></div></td>
        <td><div id='image11'><img src="<?php echo $image11; ?>"</a></div></td>
        <td><div id='image12'><img src="<?php echo $image12; ?>"</a></div></td>

		<tr><td><span class="refno">Photo Reference: <?php echo $ref; ?></span></td></tr>
		<tr><td><span class="infotext"><?php echo $text; ?></td></tr></span>



Problem page: http://www.equinefocus.co.uk/photos/2009-03-21/001.php

8 Years
Discussion Span
Last Post by sDJh

Umm... not sure. You can try to set "cellspacing=0" and "cellpadding=0" in each <td>. And you have an "</a>" in each field without any opening tag.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.