Taille de colonne et php

Bonjour, voila mon probleme:

J'ai un tableau qu'un scrip php m'affiche et je voudrais dimensionner les colonnes mais impossible de trouver quoi faire :
Voila mon tableau :
echo '<table align="center" border="1" width="75%">';
echo '<caption> Aperçu';
echo '</caption>';
echo '<tr>';
echo '<td>';
echo 'NETAB';
echo '</td>';
echo '<td>';
echo 'Nom Etablissement';
echo '</td>';
echo '<td>';
echo 'Nb Contacts';
echo '</td>';
echo '</tr>';
echo '</table>';

while ($data = mysql_fetch_row($req))
{
//Tableau
echo '<table align="center" border="1" width="65%">';
echo "<tr>";
echo "<td>";
echo $data[0];
echo "</td>";
echo "<td>";
echo $data[1];
echo "</td>";
echo "<td>";
echo $data[2];
echo "</td>";
echo "</tr>";
echo "</table>";

}
Configuration: Windows XP
Firefox 3.0.10

4 réponses

  1. bahh faut ajouter a tes <td> l'attribut width :
    <td width="100px">
    0
    1. J'ai essayé avec
      <td width="100px"> et avec
      <td width="50%">
      et ca ne marche pas.
      0
      1. faut bien tenir compte des colonne avec colspan pour t'aider affiche la bordure de ton tableau
        0
        1. J'ai pas précisé que le tableau est dimensionné avec du CSS :

          d
          {
          border:1px solid black;
          width:30%;
          text-align:center;
          }

          table
          {
          border-width:1px;
          border-style:inset;
          border-color:black;
          width:90%;
          color:black;
          }

          caption
          {
          font-weight:bold
          }
          0