Разтояние между новините

Gamerz

Registered
Как да направя новините да имат разтояние помежду си като са една под друга.

Код:
<?php
		$featured_news = mysql_query("SELECT * from ccms_news where featured='1' order by id desc limit 15");
		$c = 1;
		while ($row = mysql_fetch_assoc($featured_news)) {

		// <span class=\"contentlight\"> - "; echo days_ago($row[timestamp]); echo "</SPAN>

			$title_start = preg_replace('/[^a-zA-Z0-9 *]/', '', $row[title]); 
			$title_seo = str_replace(' ', '-', $title_start);

			if($odd = $c%2 ) { 
				$style = "featured_bg1.jpg";
			} else { 
				$style = "";
			}

echo "		<tr>

			<td >

				<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" align=\"center\">
				<tr>
					<td width=\"1%\"><a href=\"story-$row[id]-$title_seo.html\"><img alt=\"$row[title]\" align=\"left\" src=\"thumbnailer.php?type=featured_news&image=$row[image]\" style=\"border: 1px solid #B6B6B6;\" width=\"130\" height=\"85\"></a></td>
					<td width=\"99%\" valign=\"top\" style=\"padding: 5px;\">\n";

					if ($row[platform]) {
echo "						<img src=\"images/consoles/$row[platform].gif\" align=\"right\">";
					}

echo "					<a href=\"story-$row[id]-$title_seo.html\" class=\"latest_news\">$row[title]</a><br />
					<SPAN class=\"latest_news\">$row[prev_news]</SPAN></td>
				</tr>
				</table>

			</td>
		</tr>\n\n";

		$c++;
		}

?>
 
Gamerz каза:
Как да направя новините да имат разтояние помежду си като са една под друга.

Код:
<?php
		$featured_news = mysql_query("SELECT * from ccms_news where featured='1' order by id desc limit 15");
		$c = 1;
		while ($row = mysql_fetch_assoc($featured_news)) {

		// <span class="contentlight"> - "; echo days_ago($row[timestamp]); echo "</SPAN>

			$title_start = preg_replace('/[^a-zA-Z0-9 *]/', '', $row[title]); 
			$title_seo = str_replace(' ', '-', $title_start);

			if($odd = $c%2 ) { 
				$style = "featured_bg1.jpg";
			} else { 
				$style = "";
			}

echo "		<tr style='margin-top:20px'> // този ред е променен само

			<td >

				<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
				<tr>
					<td width="1%"><a href="story-$row[id]-$title_seo.html"><img alt="$row[title]" align="left" src="thumbnailer.php?type=featured_news&image=$row[image]" style="border: 1px solid #B6B6B6;" width="130" height="85"></a></td>
					<td width="99%" valign="top" style="padding: 5px;">\n";

					if ($row[platform]) {
echo "						<img src="images/consoles/$row[platform].gif" align="right">";
					}

echo "					<a href="story-$row[id]-$title_seo.html" class="latest_news">$row[title]</a><br />
					<SPAN class="latest_news">$row[prev_news]</SPAN></td>
				</tr>
				</table>

			</td>
		</tr>\n\n";

		$c++;
		}

?>
така ?
 

Back
Горе