i have this code in which i retreive jokes from database and show in table .problem is the result are being overlapped because m umable to change the top: attribute of table can anyone enlighten me with any idea so that i keeps every table at a distance of 20px from each other or a way that i can show data in an html table
<html>
<body>
<?php
$username="root";
$password="";
$database="";
mysql_connect('localhost',$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM jokes";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
?>
<?php
$i=0;
while ($i < $num) {
$k=mysql_result($result,$i,"name");
$j=mysql_result($result,$i,"content");
echo "<table border='1' cellpadding='0' cellspacing='0' style='position:absolute; left: 240px; top: 182px; width: 354px; height:20px;'><tr><td><center>";
echo $k;
echo "</center></td></tr></table>";
echo "<table border='1' cellpadding='0' cellspacing='0' style='position:absolute; left: 240px; top: 203px; width: 354px; height:100px;'><tr><td>";
echo $j;
echo "</td></tr></table>";
$i++;
}
?>
</body>
</html>
thanx help will be much appreciated