Come mai se ci metto ad una cella un valore in pixel per la width,se ci scrivo dentro qualcosa piu lunga la cella si allarga?
Ecco il codice:
<table width="486" border="0" cellspacing="5" cellpadding="0">
<tr>
<td height="0"><font size="6" face="Times New Roman, Times, serif">Notiziario
economico </font></td>
</tr>
<tr background="images/blu1.gif">
<td height="1" bgcolor="#003366">[img]images/blu1.gif[/img]</td>
</tr>
<tr align="left" valign="top">
<td height="1" width="200">
<?
$record=array();
if (!empty($HTTP_GET_VARS['CodNot'])){
$con=new DbConnector;
$con->_connect();
$con->_use('test');
$query="select * from news where cod=".$HTTP_GET_VARS['CodNot'];
$response=$con->_sql($query);
$record=$response[0];
$con->_disconnect();
}
echo "<div align=\"justify\" size=\"3\">".$record['titolo']."</div>
";
?>
</p>
<table width="150" border="0" cellspacing="1" cellpadding="2" align="center">
<tr>
<td valign="top"><?php
list ($anno, $mese, $giorno) = explode ("-", $record['data']);
echo $giorno."/".$mese."/".$anno; ?>
</td>
</tr>
<tr>
<td valign="top" width="40">
<?php
$p = explode(" ", $record['testo']);
$n=0;
$j=0;
while($p[$j]){
$n = strlen($p[$j]);
//print_r(strlen($p[5]));
if ($n > 48){
$x=0;
while($n > 48){
$n = $n / 2;
echo substr($p[$j],$x,48)."
";
$x=$x+48;
}
}else{
echo $p[$j].""; }
$j++;
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>