Ciao
Non so se è la sezione giusta..comunque:
Richiamo dei dati dal db mysql che vengono stampati in celle di una tabella:
Sotto il codice per le intestazioni:
codice:
.........
<table border="1" width="100%" id="table55">
<tr>
<td height="30" width="6%" align="center" id="row61">N.</td>
<td height="30" width="28%" align="center" id="row61">Descrizione</td>
<td height="30" width="20%" align="center" id="row61">Fornitore</td>
<td height="30" width="12%" align="center" id="row61">Importo</td>
<td height="30" width="10%" align="center" id="row61">Scadenza</td>
<td height="30" width="8%" align="center" id="row61">Stato</td>
<td height="30" colspan="2" width="16%" align="center" id="row61">Note</td>
</tr>
</table>
.............
qui dove vengono stampati i dati veri e propri richiamati dal db con un ciclo while:
Codice PHP:
................
echo "<table border=\"1\" width=\"100%\" id=\"tablein\"><tr class=alternate".$i.">
<td height=\"54\" width=\"6%\" align=\"center\" id=\"row7\">$doc</td>
<td height=\"54\" width=\"28%\" align=\"left\" id=\"row7\">$descrizione</td>
<td height=\"54\" width=\"20%\" align=\"center\" id=\"row7\">$forn</td>
<td height=\"54\" width=\"12%\" align=\"center\" id=\"row7\">$impvis</td>
<td height=\"54\" width=\"10%\" align=\"center\" id=\"row7\">$scad</td>
<td height=\"54\" width=\"8%\" align=\"center\" id=\"row7\"><img src=\"stili/".$icona."\" border=\"0\" />[size="1"]<sup>$dif_giorni[/size]</sup></td>
<td height=\"54\" width=\"16%\" align=\"left\" id=\"row7\">$note</td>
</tr></table>
";
...............
con relativo css:
codice:
...
#table55 { border-collapse:collapse; border-spacing:0px; }
#tablein { border-collapse:collapse; border-spacing:0px; page-break-before: avoid;}
td#row61, th#row61 {
background-color: silver;
color:white;
font-size:10px Georgia, "Times New Roman", Times, serif;
font: 10px Georgia, "Times New Roman", Times, serif;
padding-left: 4px;
padding-right: 4px;
max-width: 150px;
border-spacing:0px;
word-wrap: break-word;
td#row7, th#row7 {
font: 10px Georgia, "Times New Roman", Times, serif;
padding-left: 4px;
padding-right: 4px;
max-width: 150px;
border-spacing:0px;
word-wrap: break-word;
}
Non capisco perchè il codice per i dati della seconda tabella produce celle (quasi) allineate per bene, mentre il codice della tabella delle intestazioni produce le celle non allineate con quelle sotto dei dati (sopratutto la seconda e la terza.
Il codice sembra identico eppure.
Potete aiutarmi a capire dove è il problema?
Grazie