codice:
<td ID="MAINTD"width="80%" align="center" valign="top" style="border-left:dashed; border-left-width:1px;
border-left-color:#990000; border-right:dashed; border-right-width:1px;
border-right-color:#990000;">
<?php if ($_SESSION['login']!='yes') { include("invito.php"); echo $_SESSION['login']; }?>
</p>
<div style="background-color:#990000; width:200px; color:#FFFFFF;";>ULTIMI TUTORIALS:</div>
<?php
$myconn=mysql_connect("mysql.wip.BLABLAH.org", "BLA", "akuma999") or die("Connection error");
$db_name="BLAH_demo";
mysql_select_db($db_name,$myconn);
$query_read="SELECT * FROM fck_data order by ID DESC";
$result=mysql_query($query_read,$myconn);
$row_number=mysql_num_rows($result);
echo "<div style=' width:100%; float:left; border:dashed; border-color:#C3F'>";
for ($i=0;$i<6;$i++)
{
$array_result=mysql_fetch_row($result);
$id=$array_result[0];
$testo=$array_result[1];
$titolo=$array_result[2];
$titolo=strip_tags($titolo);
$testo=strip_tags($testo);
$testo=troppolunga($testo,40);
$testo = substr($testo, 0, 180)."...";
include("cellindex.php");
if ($i==2) { echo "</div><div align='center' style='float:left;'>"; };
}
echo "</div>";
?>
Ecco qua grosso modo il codice che mi sta facendo impazzire.
Come potete vedere tramite un ciclo for inserisco "cellindex.php"
(che contiene una tabella con style:float:left in modo da poterle affiancare.
Ogni tre tabelle vado a capo, aprendo un altro div.
Quello che proprio non mi riesce è centrare le tabelle nel TD che si chiama 'MainTD'
non so se mi sono spiegato, ma sto online 20 ore al giorno per motivi di lavoro... chiunque voglia aiutarmi scriva pure, risponderò immediatamente...