Taille de colonne et php

Tydher Messages postés 127 Statut Membre -  
Tydher Messages postés 127 Statut Membre -
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. babou054 Messages postés 162 Date d'inscription   Statut Membre 11
     
    bahh faut ajouter a tes <td> l'attribut width :
    <td width="100px">
    0
  2. Tydher Messages postés 127 Statut Membre 6
     
    J'ai essayé avec
    <td width="100px"> et avec
    <td width="50%">
    et ca ne marche pas.
    0
  3. babou054 Messages postés 162 Date d'inscription   Statut Membre 11
     
    faut bien tenir compte des colonne avec colspan pour t'aider affiche la bordure de ton tableau
    0
  4. Tydher Messages postés 127 Statut Membre 6
     
    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