IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

HTML Discussion :

tableau: largeurs cellules identiques sous IE mais pas sous FF


Sujet :

HTML

  1. #1
    Membre extrêmement actif Avatar de cortex024
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    1 301
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2005
    Messages : 1 301
    Par défaut tableau: largeurs cellules identiques sous IE mais pas sous FF
    Bonjour,

    J'ai un tableau avec 3 cellules de large...

    le tableau fait 980px, la cellule du centre 800px, et les 2 de cotés 90px...

    A priori je devrais avoir les 2 cellules extérieure de même largeur, eh bien non sous firefox!

    La cellule de gauche est plus large, il faut que je mette 80px - 800px - 100px pour avoir la meme largeur en cm à gauche et à droite...

    Par contre sous IE, aucun problèmes, elles ont bien la même largeur lorsque je mets le même nombre de px, ce qui est logique

    A quoi cela est il du?

    Merci

  2. #2
    Modérateur
    Avatar de blueice
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2003
    Messages
    3 493
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2003
    Messages : 3 493
    Par défaut
    Donne nous ton bout de code, sans quoi celà risque d'être difficile de te venir en aide...

  3. #3
    Modérateur
    Avatar de Bisûnûrs
    Profil pro
    Développeur Web
    Inscrit en
    Janvier 2004
    Messages
    9 920
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Janvier 2004
    Messages : 9 920
    Par défaut
    Une histoire de cellspacing automatique de 3 pixels entre les cellules j'imagine.

  4. #4
    Membre Expert
    Avatar de trotters213
    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    2 571
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Gard (Languedoc Roussillon)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 2 571
    Par défaut

    Pense que margin:0 ne fonction ne pas avec un tableau donc il faut laisser <table cellspacing="0px" ....> et padding:0px; dans ton CSS.
    Ton résultat devrait être le même ensuite.
    Pense également à déduire les marges de la taille

  5. #5
    Membre extrêmement actif Avatar de cortex024
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    1 301
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2005
    Messages : 1 301
    Par défaut
    voila le code comme demandé:

    trotters213, j'ai pas très bien compris que faire?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    echo "<table cellSpacing=0 cellPadding=0 bgColor=#486596 height=\"565\" width=\"980\" border=\"0\">";
    echo "   <tr>";
    echo "     <td width=\"90\" height=\"50\"></td>";
    echo "     <td width=\"800\" align=\"center\" height=\"50\">";
    echo "       </td>";
    echo "     <td width=\"90\" height=\"50\"></td>";
    echo "   </tr>";
    echo "   <tr>";
    echo "     <td width=\"90\" align=\"center\" height=\"500\">";
    echo "       </td>";
    echo "     <td width=\"800\" height=\"500\">";
    echo "        <table cellSpacing=0 cellPadding=0 bgColor=#486596 height=\"15\" width=\"800\" border=\"0\">";
    echo "         <tr>";
    echo "           <td width=\"250\" height=\"15\" align=\"left\"><a href=\"mailto:xxxxxxxxxxxx@hotmail.com\">contact</a></td>";
    echo "           <td class=\"visites\" width=\"300\" height=\"15\" align=\"center\">";
     
    // *** affichage compteur visites ****************
     
    echo "           </td>";
    echo "           <td width=\"250\" height=\"15\" align=\"right\"><a href=\"index.php?action=apropos\">à propos du site</a></td>";
    echo "         </tr>";
    echo "        </table>";
    echo "     </td>";
    echo "     <td width=\"90\" height=\"15\"></td>";
    echo "   </tr>";
    echo "</table>";

  6. #6
    Modérateur
    Avatar de blueice
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2003
    Messages
    3 493
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2003
    Messages : 3 493
    Par défaut
    Essaye comme ca :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
     
    <table cellspacing="0" cellpadding="0" bgcolor="#486596" height="565" width="980" border="0">
                <tr>
                    <td width="90" height="50">
                    </td>
                    <td width="800" align="center" height="50">
                    </td>
                    <td width="90" height="50">
                    </td>
                </tr>
                <tr>
                    <td width="90" align="center" height="500">
                    </td>
                    <td width="800" height="500">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="250">
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td width="250">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="90" height="15">
                    </td>
                </tr>
            </table>

  7. #7
    Membre extrêmement actif Avatar de cortex024
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    1 301
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2005
    Messages : 1 301
    Par défaut
    A voir ta proposition avec les tailles de cellules définies en % ca a fait tilt...

    j'ai modifié les 800px intérieur par 100%, et maintenant tout est nickel

    Merci

  8. #8
    Membre Expert
    Avatar de trotters213
    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    2 571
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Gard (Languedoc Roussillon)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 2 571
    Par défaut
    Juste pour info, plutôt que de faire ceci qui est lourd et pas très lisible :
    Code PHP : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    echo "<table cellSpacing=0 cellPadding=0 bgColor=#486596 height=\"565\" width=\"980\" border=\"0\">";
    echo "   <tr>";
    echo "     <td width=\"90\" height=\"50\"></td>";
    echo "     <td width=\"800\" align=\"center\" height=\"50\">";
    echo "       </td>";
    echo "     <td width=\"90\" height=\"50\"></td>";
    echo "   </tr>";
    echo "   <tr>";
    echo "     <td width=\"90\" align=\"center\" height=\"500\">";
    echo "       </td>";
    echo "     <td width=\"800\" height=\"500\">";
    echo "        <table cellSpacing=0 cellPadding=0 bgColor=#486596 height=\"15\" width=\"800\" border=\"0\">";
    echo "         <tr>";
    echo "           <td width=\"250\" height=\"15\" align=\"left\"><a href=\"mailto:xxxxxxxxxxxx@hotmail.com\">contact</a></td>";
    echo "           <td class=\"visites\" width=\"300\" height=\"15\" align=\"center\">";
     
    // *** affichage compteur visites ****************
     
    echo "           </td>";
    echo "           <td width=\"250\" height=\"15\" align=\"right\"><a href=\"index.php?action=apropos\">à propos du site</a></td>";
    echo "         </tr>";
    echo "        </table>";
    echo "     </td>";
    echo "     <td width=\"90\" height=\"15\"></td>";
    echo "   </tr>";
    echo "</table>";
    fais ceci :
    Code PHP : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    echo '<table cellSpacing=0 cellPadding=0 bgColor=#486596 height="565" width="980" border="0">
       <tr>
         <td width="90" height="50"></td>
         <td width="800" align="center" height="50">
           </td>
         <td width="90" height="50"></td>
       </tr>
       <tr>
         <td width="90" align="center" height="500">
           </td>
         <td width="800" height="500">
            <table cellSpacing=0 cellPadding=0 bgColor=#486596 height="15" width="800" border="0">
             <tr>
               <td width="250" height="15" align="left"><a href="mailto:xxxxxxxxxxxx@hotmail.com">contact</a></td>
               <td class="visites" width="300" height="15" align="center">
     
    <!--affichage compteur visites-->
     
               </td>
               <td width="250" height="15" align="right"><a href="index.php?action=apropos">à propos du site</a></td>
             </tr>
            </table>
         </td>
         <td width="90" height="15"></td>
       </tr>
    </table>';

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Probleme affichage code sous IE mais pas sous Firefox
    Par misirlou dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 20/04/2006, 15h18
  2. Réponses: 1
    Dernier message: 13/04/2006, 13h21
  3. [XML] Shift-JIS : Marche sous Firefox mais pas sous IE...
    Par Magus (Dave) dans le forum XML/XSL et SOAP
    Réponses: 2
    Dernier message: 24/01/2006, 18h19
  4. Jascript fonction sous IE mais pas sous Netscape ou FF
    Par pierrot10 dans le forum Général JavaScript
    Réponses: 16
    Dernier message: 29/12/2005, 18h02
  5. Menu dynamique marchant sous FF mais pas sous IE
    Par T-durden dans le forum Général JavaScript
    Réponses: 5
    Dernier message: 18/08/2005, 15h14

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo