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 non centré quand je modifie mes pages en XHTML


Sujet :

HTML

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    52
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 52
    Points : 40
    Points
    40
    Par défaut tableau non centré quand je modifie mes pages en XHTML
    Bonjour,
    je suis en train de modifier mes pages en XHTML. Et quand je corrige une erreur, le tableau se décale mais il n'y a plus d'erreurs.

    *document type does not allow element "tr" here.
    <table style="border-collapse: collapse;cellspacing:0 ;cellpadding:0;width:100%; border:0">
    <tr>
    <td width="100%">
    <script language="javascript" type="text/javascript">
    document.write(top);
    </script></td>
    <tr> <td width="100%" style="bgcolor:#2492ff;colspan:5 ;valign;top">
    <table style="border-collapse: collapse; bordercolor:#111111 ;cellspacing:0 ;cellpadding:0; width:100%; border:0">
    <tr>
    <td width="60%" height="24">
    <p class="texte" style="margin-left: 5px"><b><font style="color:#ffffff" />
    centre de formation à distance soumis au
    contrôle pédagogique de l´état</b></p>
    </td>
    <td width="40%">
    <table style="border-collapse: collapse;bordercolor:#111111;
    cellspacing:0;cellpadding:0;width:100%;border:0">
    <tbody>
    <tr>
    <td width="100%">
    <p class="texte"
    style="margin-left: 5px; text-align: right"><b><font style="
    color=#ffffff" /><font size="2" />contact : <font style="
    color:#ffffff;size:2" />08 203 203 75</b><font style="
    color:#ffffff" /> <span style="font-size: 7pt">(numéro
    indigo 0.15&euro;/min)
    <script type="text/javascript">
    <!--
    xt_param = 's=164629&p=paramédical_social';
    xt_r = document.referrer;
    xt_h = new date();
    xt_i = '<img width="1" height="1" src="http://logi7.xiti.com/hit.xiti?'+xt_param;
    xt_i += '&hl='+xt_h.gethours()+'x'+xt_h.getminutes()+'x'+xt_h.getseconds();
    if(parsefloat(navigator.appversion)>=4)
    {xt_s=screen;xt_i+='&r='+xt_s.width+'x'+xt_s.height+'x'+xt_s.pixeldepth+'x'+xt_s.colordepth;}
    document.write(xt_i+'&ref='+xt_r.replace(/[<>"]/g, '').replace(/&/g, '$')+'" >');
    //-->
    </script>

    <img width="1" alt="" height="1" src="http://logi7.xiti.com/hit.xiti?s=164629&amp;p=paramédical_social" /></span></p>
    </td>
    </tr>
    </tbody>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </tr>
    </table>

    je corrige cette erreur en encadrant le tr

    <table style="border-collapse: collapse;cellspacing:0 ;cellpadding:0;width:100%; border:0">
    <tr>
    <td width="100%">
    <script language="javascript" type="text/javascript">
    document.write(top);
    </script></td>
    <td><table><tr>
    <td width="100%" style="bgcolor:#2492ff;colspan:5 ;valign;top">
    <table style="border-collapse: collapse; bordercolor:#111111 ;cellspacing:0 ;cellpadding:0; width:100%; border:0">
    <tr>
    <td width="60%" height="24">
    <p class="texte" style="margin-left: 5px"><b><font style="color:#ffffff" />
    centre de formation à distance soumis au
    contrôle pédagogique de l&#180;état</b></p>
    </td>
    <td width="40%">
    <table style="border-collapse: collapse;bordercolor:#111111;
    cellspacing:0;cellpadding:0;width:100%;border:0">
    <tbody>
    <tr>
    <td width="100%">
    <p class="texte"
    style="margin-left: 5px; text-align: right"><b><font style="
    color=#ffffff" /><font size="2" />contact : <font style="
    color:#ffffff;size:2" />08 203 203 75</b><font style="
    color:#ffffff" /> <span style="font-size: 7pt">(numéro
    indigo 0.15&euro;/min)
    <script type="text/javascript">
    <!--
    xt_param = 's=164629&p=paramédical_social';
    xt_r = document.referrer;
    xt_h = new date();
    xt_i = '<img width="1" height="1" src="http://logi7.xiti.com/hit.xiti?'+xt_param;
    xt_i += '&hl='+xt_h.gethours()+'x'+xt_h.getminutes()+'x'+xt_h.getseconds();
    if(parsefloat(navigator.appversion)>=4)
    {xt_s=screen;xt_i+='&r='+xt_s.width+'x'+xt_s.height+'x'+xt_s.pixeldepth+'x'+xt_s.colordepth;}
    document.write(xt_i+'&ref='+xt_r.replace(/[<>"]/g, '').replace(/&/g, '$')+'" >');
    //-->
    </script>

    <img width="1" alt="" height="1" src="http://logi7.xiti.com/hit.xiti?s=164629&amp;p=paramédical_social" /></span></p>
    </td>
    </tr>
    </tbody>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table></td>
    </tr>
    </table>
    Merci.

  2. #2
    Membre confirmé Avatar de Perceval
    Homme Profil pro
    Responsable de projet fonctionnel
    Inscrit en
    Mars 2003
    Messages
    355
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Responsable de projet fonctionnel
    Secteur : Distribution

    Informations forums :
    Inscription : Mars 2003
    Messages : 355
    Points : 464
    Points
    464
    Par défaut
    Euhhh le jeu des 7 erreurs, c'est marrant, mais je t'avoue que dans le code, c'est moins drôle, faudrait montré à quelle ligne se trouve l'erreur....

    Mais bon je vais faire un effort et trouver là où tu rajouter un truc...

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    52
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 52
    Points : 40
    Points
    40
    Par défaut
    j'ai montré la ligne, c'est mis en rouge.

  4. #4
    Membre confirmé Avatar de Perceval
    Homme Profil pro
    Responsable de projet fonctionnel
    Inscrit en
    Mars 2003
    Messages
    355
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Responsable de projet fonctionnel
    Secteur : Distribution

    Informations forums :
    Inscription : Mars 2003
    Messages : 355
    Points : 464
    Points
    464
    Par défaut
    oui je viens de voir
    (C'est dans ce genre de situation que c'est bien plus claire de dissocier le contenant du contenu... ^_^)

  5. #5
    Membre émérite
    Avatar de Nesmontou
    Homme Profil pro
    Architecte logiciel
    Inscrit en
    Septembre 2004
    Messages
    1 612
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Architecte logiciel
    Secteur : Finance

    Informations forums :
    Inscription : Septembre 2004
    Messages : 1 612
    Points : 2 969
    Points
    2 969
    Par défaut Re: tableau non centré quand je modifie mes pages en XHTML
    Citation Envoyé par Linoa
    document type does not allow element "tr" here
    C'est normal, tu ne fermes pas la balise <tr> et tu en ouvre une

    Tu fais quelque chose du type
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    <table>
      <tr>
        <td>...</td>
        <td>...</td>
      <tr>
        <td>...</td>
        <td>...</td>
    </table>
    Il faut fermer le tr avant d'en ouvrir un autre

  6. #6
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    52
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 52
    Points : 40
    Points
    40
    Par défaut
    J'ai réussi pour une des pages mais celle-ci j'arrive pas a recentré :
    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
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
     
      <tr>
        <td colspan="2">
    		<table style="border-collapse: collapse" cellspacing="0" cellpadding="0" width="100%" border="0">
    			<tr>
    				<td width="100%">
    		<script language="javascript" type="text/javascript">
                     document.write(top);
                    </script></td></tr>
    		<tr>
    			    <td width="100%" style="bgcolor=0066cc;colspan=5;valign:top">
    			    	<table style="border-collapse: collapse;bordercolor:#111111;cellspacing:0;cellpadding:0; width:100%; border:0">
    				        <tr>
    			          		<td width="60%" height="24">
    			            		<p class="texte" style="margin-left: 5px"><b><font style="color:#ffffff" />centre de formation à distance soumis au contrôle pédagogique de l´état</b></p>
    			            	</td>
    				         	<td width="40%">
    					            <table style="border-collapse: collapse; bordercolor:#111111; 
                                                        cellspacing:0;cellpadding:0;width:100%;border:0">
    					              <tbody>
    						              <tr>
    						                <td width="100%">
    						                  <p class="texte" 
    						                  style="margin-left: 5px; text-align: right"><b><font style="
    						                  color:#ffffff" /><font size="2">contact : </font><font style=" 
    							                  color:#ffffff;size:2" />08 203 203 75</b><font style="
    							                  color:#ffffff" /> <span style="font-size: 7pt">(numéro indigo 
    						                  0.15&euro;/min)
    										  <script type="text/javascript">
                                                                                            <!--
                                                                                            xt_param = 's=164629&p=fonction_publique';      
                                                                                            xt_r = document.referrer;
                                                                                            xt_h = new date();
                                                                                            xt_i = '<img width="1" height="1" src="http://logi7.xiti.com/hit.xiti?'+xt_param;
                                                                                            xt_i += '&hl='+xt_h.gethours()+'x'+xt_h.getminutes()+'x'+xt_h.getseconds();
                                                                                            if(parsefloat(navigator.appversion)>=4)
                                                                                            {xt_s=screen;xt_i+='&r='+xt_s.width+'x'+xt_s.height+'x'+xt_s.pixeldepth+'x'+xt_s.colordepth;}
                                                                                            document.write(xt_i+'&ref='+xt_r.replace(/[<>"]/g, '').replace(/&/g, '$')+'" >');
                                                                                            //-->
                                                                                            </script>
     
    											<img width="1" alt="" height="1" src="http://logi7.xiti.com/hit.xiti?s=164629&amp;p=fonction_publique" /></span></p>
    							              </td>
    							            </tr>
    							          </tbody>
    							     </table>
    							 </td>
    						</tr>
     
    					</table>
    				</td>
     
    			</tr>
     
    		 </table>
    	</td>
    </tr>
    et ma page apparait comme étant valide.

    Merci.

  7. #7
    Membre confirmé Avatar de Perceval
    Homme Profil pro
    Responsable de projet fonctionnel
    Inscrit en
    Mars 2003
    Messages
    355
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Responsable de projet fonctionnel
    Secteur : Distribution

    Informations forums :
    Inscription : Mars 2003
    Messages : 355
    Points : 464
    Points
    464
    Par défaut
    Donne une taille à ton tableau et met lui comme attribut dans ta css :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    table {margin:0 auto; }

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

Discussions similaires

  1. [WB18] non execution d une de mes pages "500 Internal Server Error"
    Par Bkhugues dans le forum WebDev
    Réponses: 1
    Dernier message: 13/03/2014, 10h06
  2. tableau non centré
    Par kev484 dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 04/01/2008, 13h19
  3. Tableau non centré
    Par fred1599 dans le forum Mise en forme
    Réponses: 2
    Dernier message: 05/11/2007, 18h52
  4. Réponses: 1
    Dernier message: 07/05/2007, 10h13
  5. [XHTML] Moyen plus rapide pour mettre mes pages en XHTML
    Par Linoa dans le forum Balisage (X)HTML et validation W3C
    Réponses: 6
    Dernier message: 30/08/2005, 17h46

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