Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > HTML / DHTML / XHTML
HTML / DHTML / XHTML Forum sur la programmation HTML / DHTML/ XHTML et la validation W3C. Cours (X)HTML, FAQ (X)HTML
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 25/11/2011, 19h21   #1
Invité de passage
 
Homme
Inscription : novembre 2011
Messages : 1
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations forums :
Inscription : novembre 2011
Messages : 1
Points : 0
Points : 0
Par défaut Décalage de ligne dans un tableau

Bonjour à tous,

J'ai "bidouillé" un petit site pour ma radio. Mon site est sous la forme d'un tableau avec une partie "entête", une partie centrale, sur laquelle se situe le décalage vers la droite, et une partie basse .
J'ai mis un fond bleu et vous verrez que le fond bleu n'apparaît pas sur la droite de la partie centrale.
L'objectif est que les éléments de la partie centrale soient centrés et que le fond bleu apparaisse sur toute la hauteur droite du site.
Voici le code, j'ai bien séparé les 3 parties du code. En espèrant que vous pourrez m'aider, et je vous en remercie par avance. Cordialement, Patrice

Code :
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<HTML>
<HEAD>
 
 
<META NAME="keywords" CONTENT="country show radio,radio country,country radio,country show,country music,country music,country musique,craponne sur arzon,festival de craponne,patrice lemaitre,shania twain,garth brooks,keith urban,dierks bentley,carrie underwood,brad paisley,george strait,taylor swift,nashville,music city,new country,randy travis, sugarland">
<title>Country Show Radio</title>
<META name="description" content="Country Show Radio (24h/24h) est une radio country qui vous fait découvrir la New Country et la Country Music, le genre musical le plus populaire aux Etats-Unis. Cette radio me permet de partager avec vous toute la musique que j'aime, en vous proposant toutes les nouveautés en provenance de Nashville."> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<TITLE>Accueil de R.I.G. Country Show</TITLE>
</HEAD>
<BODY bgcolor="#234CA5" >
<BODY link="white" vlink="white" alink="white">
<TR><TD WIDTH="25%" VALIGN="TOP" HEIGHT=884>
<TD WIDTH="75%" VALIGN="TOP" HEIGHT=884>
 
 
 
 
<TABLE border="1" bgcolor="white" bordercolor="white" cellspacing="0" width="100%">
<TR>
<TD width="33%" bgcolor="white" border="1"><CENTER><SCRIPT>
var today=new Date();
var AfficheDate="";
jj=today.getDay();
if ( jj == 0 ) AfficheDate= "Dimanche " +today.getDate();
if ( jj == 1 ) AfficheDate= "Lundi " +today.getDate();
if ( jj == 2 ) AfficheDate= "Mardi " +today.getDate();
if ( jj == 3 ) AfficheDate= "Mercredi " +today.getDate();
if ( jj == 4 ) AfficheDate= "Jeudi " +today.getDate();
if ( jj == 5 ) AfficheDate= "Vendredi " +today.getDate();
if ( jj == 6 ) AfficheDate= "Samedi " +today.getDate();
mm=today.getMonth();
//yy=1900+today.getYear()
yy=today.getYear()
if ( yy < 2000 ) yy = 1900 + yy;
if ( mm == 0 ) AfficheDate=AfficheDate+" janvier "+yy
if ( mm == 1 ) AfficheDate=AfficheDate+" février "+yy
if ( mm == 2 ) AfficheDate=AfficheDate+" mars "+yy
if ( mm == 3 ) AfficheDate=AfficheDate+" avril "+yy
if ( mm == 4 ) AfficheDate=AfficheDate+" mai "+yy
if ( mm == 5 ) AfficheDate=AfficheDate+" juin "+yy
if ( mm == 6 ) AfficheDate=AfficheDate+" juillet "+yy
if ( mm == 7 ) AfficheDate=AfficheDate+" août "+yy
if ( mm == 8 ) AfficheDate=AfficheDate+" septembre "+yy
if ( mm == 9 ) AfficheDate=AfficheDate+" octobre "+yy
if ( mm == 10 ) AfficheDate=AfficheDate+" novembre "+yy
if ( mm == 11 ) AfficheDate=AfficheDate+" décembre "+yy
document.write("<FONT  SIZE=4>"+AfficheDate+"</FONT>");</SCRIPT>&nbsp<P><A href="http://www.countryshowradio.com/programme.htm" target="new window"><img src="programmejaune4.gif"></A></TD>
<TD width="33%"bgcolor="white" border="0"><CENTER><IMG src="countryshowradio.gif" border="0"></CENTER></TD>
<TD width="33%" bgcolor="white" border="1"><CENTER><A href=mailto:countryshowradio@hotmail.fr><IMG SRC="email.jpg"></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A href="http://listen.radionomy.com/country-show-radio.m3u" target="contenu"><IMG SRC="ecouter.gif"></A><TD>
</TR>
</TABLE></TABLE>
 
 
 
 
 
 
 
<table width="900" bgcolor="white" bordercolor="black" border="0" height="400">
    <tr valign="middle"> 
<td width="400" valign="top" border="1"><CENTER><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/pages/Country-Show-Radio/123154257747586" layout="box_count" show_faces="true" width="50" colorscheme="dark"></fb:like>&nbsp;&nbsp;<A href="http://fr-fr.facebook.com/pages/Country-Show-Radio/123154257747586" target="contenu"><IMG SRC="facebooklogo.jpg"></A><BR><script type="text/javascript" src="http://www.123votez.com/sondages/sondage-gratuit-48459_10320669.js" charset="UTF-8"></script> <a id="wait_10320669" href="http://www.123votez.com"><img border="0" alt="sondage" width="20" height="20" src="http://www.123votez.com/images/wait.gif" /></a> <script type="text/javascript" src="http://www.123votez.com/sondages/fonctions/javascript/chargement.js"></script> <noscript> <a title="sondage votezpour artiste semaine vainqueur sera diffus" href="http://www.123votez.com/sondages/sondage-votezpour-artiste-semaine-vainqueur-sera-diffus-48459_10320669.php" >Votez pour "L'ARTISTE DE LA SEMAINE". Le vainqueur sera diffusé pendant 1 heure dimanche 20 novembre de 20 h 00 à 21 h 00 !!! Fin du sondage : samedi 19 novembre à minuit.</a><a title="sondages gratuits" href="http://www.123votez.com" ></a></noscript><P><A href="http://www.radionomy.com/en/radio/country-show-radio/tracks" target="new window"><font face="arial" size="3" color="black"><B>Ecouter la radio sur Radionomy</A></td>      
<td height="238"> <div align="center">
          <table width="907" height="505" border="0">
            <tr> 
              <td width="400" background="amp_3.jpg"> 
                <div align="center"> 
                  <object width="240" height="250"><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.radionomy.com/Flash/BannerEmbed.swf?RadUID=e2d4137a-c31d-4370-9665-7a48c15a94a0&amp;titlesColor=e6db00&amp;color=0065e0&amp;autoPlay=yes&amp;lang=en" /><param name="wmode" value="transparent" /><embed src="http://www.radionomy.com/Flash/BannerEmbed.swf?RadUID=e2d4137a-c31d-4370-9665-7a48c15a94a0&amp;titlesColor=e6db00&amp;color=0065e0&amp;autoPlay=yes&amp;lang=en" wmode="transparent" type="application/x-shockwave-flash" allowscriptaccess="always" width="240" height="300"></embed></object>
                </div></td>
              <td width="500">
<table width="100%" border="0">
                  <tr> 
 
                               <td width="400" valign="top"><CENTER><A href="http://www.countrymusicfrance.com/index_suite.htm" target="new window"><img src="2011madeinusa.gif"></A><BR><A href="http://www.countryshowradio.com/singlesajoutes.htm.htm" target="new window"><img src="pub-craigmorgan-thisoleboy.jpg"></A><BR><A href="http://www.countrymusicfrance.com/index_suite.htm" target="new window"><img src="pub-tobykeithclancystavern.jpg"></A></TD>
	</tr>
 </table>                                
            </TD>            
         </table>
        </div></td>
    </tr>
  </table>
 
 
 
 
 
 
 
<TABLE border="0" bgcolor="#B9121B" bordercolor="white" cellspacing="0" width="100%">
<TD width="100%"><CENTER><A href="http://www.countryshowradio.com/singlesajoutes.htm" target="new window"><IMG SRC="logosingles.gif"></A>&nbsp;<A href="http://www.i-services.net/membres/livredor/livredor.php?uid=160691&sid=107660" target="new window"><IMG SRC="logolivredor.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/SORTIECDNEWS/index1.htm" target="new window"><IMG SRC="logocds.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/artistesfrancais.htm" target="contenu"><IMG SRC="logoartistesfrancais.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/newsdenashville.htm" target="new window"><IMG SRC="logonewsdenashville.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/survosagendas.htm" target="new window"><IMG SRC="logosurvosagendas.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/liens.htm" target="new window"><IMG SRC="logoliens.gif"></A></TD>
</TABLE>
 
<TABLE border="0" bgcolor="#B9121B" bordercolor="white" cellspacing="0" width="100%">
<TD width="38%"><CENTER><A href="http://www.i-tchat.com/?84548" target="new window"><FONT face="arial" size="3" color="white"><B>Ouvrir le Tchat</A></TD>
<TD width="25%"><CENTER><script type="text/javascript" src="http://www.i-services.net/membres/compteur/compteur.php?uid=160691&amp;sid=107660&amp;idcpt=11119&amp;cache=0&amp;position=center&amp;read_only=0"></script></TD>
<TD width="38%"><CENTER><A href="http://www.countryshowradio.com/insererradiosite.htm" target="new window"><FONT face="arial" size="3" color="white"><B>Vous souhaitez ajouter la radio sur votre site</A></TD>
</TABLE>
<FONT FACE="Arial" color="white" size ="3"><B>&nbsp<I>&copy; Country Show Radio</I>
 
 
 
</TABLE>
 
</HTML>
countryshowradio est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2011, 19h43   #2
Modérateur
 
Avatar de NoSmoking
 
Homme
Inscription : janvier 2011
Messages : 2 944
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Isère (Rhône Alpes)

Informations forums :
Inscription : janvier 2011
Messages : 2 944
Points : 4 776
Points : 4 776
Bonjour,
<TON BOUTADE>
Citation:
J'ai "bidouillé" un petit site pour ma radio
il ne fallait pas le préciser, rien qu'à observer le code cela ce voit
</TON BOUTADE>
Je ne vais pas entrer dans les détails mais j'ai mis des commentaires dans ton code
Code :
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<HTML>
<HEAD>
<META NAME="keywords" CONTENT="country show radio,radio country,country radio,country show,country music,country music,country musique,craponne sur arzon,festival de craponne,patrice lemaitre,shania twain,garth brooks,keith urban,dierks bentley,carrie underwood,brad paisley,george strait,taylor swift,nashville,music city,new country,randy travis, sugarland">
<title>Country Show Radio</title>
<META name="description" content="Country Show Radio (24h/24h) est une radio country qui vous fait découvrir la New Country et la Country Music, le genre musical le plus populaire aux Etats-Unis. Cette radio me permet de partager avec vous toute la musique que j'aime, en vous proposant toutes les nouveautés en provenance de Nashville.">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<TITLE>Accueil de R.I.G. Country Show</TITLE>
</HEAD>
<!-- 2 BALISES BODY -->
<BODY bgcolor="#234CA5" >
<BODY link="white" vlink="white" alink="white">
<!-- MANQUE  BALISE TABLE PARENT -->
  <TR>
    <TD WIDTH="25%" VALIGN="TOP" HEIGHT=884>
    <!-- MANQUE BALISE /TD -->
    <TD WIDTH="75%" VALIGN="TOP" HEIGHT=884>
      <!-- POURQUOI METTRE UNE TABLE ??????-->
      <TABLE border="1" bgcolor="white" bordercolor="white" cellspacing="0" width="100%">
        <TR>
          <TD width="33%" bgcolor="white" border="1">
            <CENTER><SCRIPT>
              <!-- ON A VU MIEUX COMME SCRIPT -->
              var today=new Date();
              var AfficheDate="";
              jj=today.getDay();
              if ( jj == 0 ) AfficheDate= "Dimanche " +today.getDate();
              if ( jj == 1 ) AfficheDate= "Lundi " +today.getDate();
              if ( jj == 2 ) AfficheDate= "Mardi " +today.getDate();
              if ( jj == 3 ) AfficheDate= "Mercredi " +today.getDate();
              if ( jj == 4 ) AfficheDate= "Jeudi " +today.getDate();
              if ( jj == 5 ) AfficheDate= "Vendredi " +today.getDate();
              if ( jj == 6 ) AfficheDate= "Samedi " +today.getDate();
              mm=today.getMonth();
              //yy=1900+today.getYear()
              yy=today.getYear() // getFullYear est MIEUX
              if ( yy < 2000 ) yy = 1900 + yy;
              if ( mm == 0 ) AfficheDate=AfficheDate+" janvier "+yy
              if ( mm == 1 ) AfficheDate=AfficheDate+" février "+yy
              if ( mm == 2 ) AfficheDate=AfficheDate+" mars "+yy
              if ( mm == 3 ) AfficheDate=AfficheDate+" avril "+yy
              if ( mm == 4 ) AfficheDate=AfficheDate+" mai "+yy
              if ( mm == 5 ) AfficheDate=AfficheDate+" juin "+yy
              if ( mm == 6 ) AfficheDate=AfficheDate+" juillet "+yy
              if ( mm == 7 ) AfficheDate=AfficheDate+" août "+yy
              if ( mm == 8 ) AfficheDate=AfficheDate+" septembre "+yy
              if ( mm == 9 ) AfficheDate=AfficheDate+" octobre "+yy
              if ( mm == 10 ) AfficheDate=AfficheDate+" novembre "+yy
              if ( mm == 11 ) AfficheDate=AfficheDate+" décembre "+yy
              document.write("<FONT  SIZE=4>"+AfficheDate+"</FONT>");
            </SCRIPT>&nbsp
            <P><A href="http://www.countryshowradio.com/programme.htm" target="new window"><img src="programmejaune4.gif"></A>
            <!-- MANQUE BALISE /CENTER -->
          </TD>
          <TD width="33%"bgcolor="white" border="0">
            <CENTER><IMG src="countryshowradio.gif" border="0"></CENTER>
          </TD>
          <TD width="33%" bgcolor="white" border="1">
            <CENTER>
              <A href=mailto:countryshowradio@hotmail.fr><IMG SRC="email.jpg"></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A href="http://listen.radionomy.com/country-show-radio.m3u" target="contenu"><IMG SRC="ecouter.gif"></A>
            <!-- MANQUE BALISE /CENTER -->
          <TD>
        </TR>
      </TABLE>
    <!-- MANQUE BALISE /TD -->
  <!-- MANQUE BALISE /TR -->
</TABLE>
 
<!-- POURQUOI NE PAS CREER UNE AUTRE LIGNE ????-->
<table width="900" bgcolor="white" bordercolor="black" border="0" height="400">
  <tr valign="middle">
    <td width="400" valign="top" border="1">
      <CENTER><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/pages/Country-Show-Radio/123154257747586" layout="box_count" show_faces="true" width="50" colorscheme="dark"></fb:like>&nbsp;&nbsp;<A href="http://fr-fr.facebook.com/pages/Country-Show-Radio/123154257747586" target="contenu"><IMG SRC="facebooklogo.jpg"></A><BR><script type="text/javascript" src="http://www.123votez.com/sondages/sondage-gratuit-48459_10320669.js" charset="UTF-8"></script> <a id="wait_10320669" href="http://www.123votez.com"><img border="0" alt="sondage" width="20" height="20" src="http://www.123votez.com/images/wait.gif" /></a> <script type="text/javascript" src="http://www.123votez.com/sondages/fonctions/javascript/chargement.js"></script> <noscript> <a title="sondage votezpour artiste semaine vainqueur sera diffus" href="http://www.123votez.com/sondages/sondage-votezpour-artiste-semaine-vainqueur-sera-diffus-48459_10320669.php" >Votez pour "L'ARTISTE DE LA SEMAINE". Le vainqueur sera diffusé pendant 1 heure dimanche 20 novembre de 20 h 00 à 21 h 00 !!! Fin du sondage : samedi 19 novembre à minuit.</a><a title="sondages gratuits" href="http://www.123votez.com" ></a></noscript>
      <P><A href="http://www.radionomy.com/en/radio/country-show-radio/tracks" target="new window">
      <font face="arial" size="3" color="black"><B>Ecouter la radio sur Radionomy<!-- MANQUE BALISE /B -->
      </A>
    </td>
    <td height="238">
      <div align="center"> <!-- INTERET DE LA DIV ??????-->
        <table width="907" height="505" border="0">
        <!-- LARGEUR TABLE 907 DANS UNE TABLE DE 900 ???? -->
        <!-- HEIGHT TABLE 505 DANS UNE TD DE 238 ???? -->
          <tr>
            <td width="400" background="amp_3.jpg">
              <div align="center">  <!-- INTERET DE LA DIV ??????-->
                <object width="240" height="250"><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.radionomy.com/Flash/BannerEmbed.swf?RadUID=e2d4137a-c31d-4370-9665-7a48c15a94a0&amp;titlesColor=e6db00&amp;color=0065e0&amp;autoPlay=yes&amp;lang=en" /><param name="wmode" value="transparent" /><embed src="http://www.radionomy.com/Flash/BannerEmbed.swf?RadUID=e2d4137a-c31d-4370-9665-7a48c15a94a0&amp;titlesColor=e6db00&amp;color=0065e0&amp;autoPlay=yes&amp;lang=en" wmode="transparent" type="application/x-shockwave-flash" allowscriptaccess="always" width="240" height="300"></embed></object>
              </div>
            </td>
            <td width="500">
              <table width="100%" border="0"><!-- POURQUOI METTRE UNE TABLE ??????-->
                <tr>
                  <td width="400" valign="top">
                    <CENTER><A href="http://www.countrymusicfrance.com/index_suite.htm" target="new window"><img src="2011madeinusa.gif"></A><BR><A href="http://www.countryshowradio.com/singlesajoutes.htm.htm" target="new window"><img src="pub-craigmorgan-thisoleboy.jpg"></A><BR><A href="http://www.countrymusicfrance.com/index_suite.htm" target="new window"><img src="pub-tobykeithclancystavern.jpg"></A>
                  </TD>
                </tr>
              </table>
            </TD>
          <!-- MANQUE BALISE TR -->
       </table>
      </div>
    </td>
  </tr>
</table>
<!-- POURQUOI NE PAS CREER UNE AUTRE LIGNE ????-->
<TABLE border="0" bgcolor="#B9121B" bordercolor="white" cellspacing="0" width="100%">
<!-- MANQUE BALISE TR -->
  <TD width="100%">
    <CENTER><A href="http://www.countryshowradio.com/singlesajoutes.htm" target="new window"><IMG SRC="logosingles.gif"></A>&nbsp;<A href="http://www.i-services.net/membres/livredor/livredor.php?uid=160691&sid=107660" target="new window"><IMG SRC="logolivredor.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/SORTIECDNEWS/index1.htm" target="new window"><IMG SRC="logocds.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/artistesfrancais.htm" target="contenu"><IMG SRC="logoartistesfrancais.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/newsdenashville.htm" target="new window"><IMG SRC="logonewsdenashville.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/survosagendas.htm" target="new window"><IMG SRC="logosurvosagendas.gif"></A>&nbsp;<A href="http://www.countryshowradio.com/liens.htm" target="new window"><IMG SRC="logoliens.gif"></A>
  </TD>
<!-- MANQUE BALISE /TR -->
</TABLE>
 
<TABLE border="0" bgcolor="#B9121B" bordercolor="white" cellspacing="0" width="100%">
<!-- MANQUE BALISE TR -->
  <TD width="38%">
    <CENTER>
      <A href="http://www.i-tchat.com/?84548" target="new window">
      <FONT face="arial" size="3" color="white"><B>Ouvrir le Tchat
      <!-- MANQUE BALISE /B -->
      </A>
      <!-- MANQUE BALISE /FONT -->
    <!-- MANQUE BALISE /CENTER -->
  </TD>
  <TD width="25%">
    <CENTER><script type="text/javascript" src="http://www.i-services.net/membres/compteur/compteur.php?uid=160691&amp;sid=107660&amp;idcpt=11119&amp;cache=0&amp;position=center&amp;read_only=0"></script>
    <!-- MANQUE BALISE /CENTER -->
  </TD>
  <TD width="38%">
    <CENTER>
      <A href="http://www.countryshowradio.com/insererradiosite.htm" target="new window">
      <FONT face="arial" size="3" color="white"><B>Vous souhaitez ajouter la radio sur votre site
      <!-- MANQUE BALISE /B -->
      </A>
      <!-- MANQUE BALISE /FONT -->
    <!-- MANQUE BALISE /CENTER -->
  </TD>
<!-- MANQUE BALISE /TR -->
</TABLE>
<FONT FACE="Arial" color="white" size ="3">
<B>&nbsp<I>&copy; Country Show Radio</I>
<!-- MANQUE BALISE /B -->
</TABLE>
<!-- MANQUE BALISE /BODY -->
</HTML>
maintenant plusieurs remarques
- mettre un DOCTYPE, il faut choisir entre HTML et XHTML
- utiliser une feuille de STYLE pour supprimer tous les styles contenus dans les balises
- l'utilisation de DIV est tout à fait approprié dans ton cas

A+
NoSmoking est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 07h31.


 
 
 
 
Partenaires

Hébergement Web