Bonjour à tous,

Je suis en train de développer un site web et j'ai un petit problème de centrage (encore un problème habituel tiens).
Le site fonctionne très bien sur Firefox mais est aligné à gauche sous IE. J'ai essayé pas mal de trucs connus ou trouvés sur les forums mais impossible de corriger le problème. (doctype, div de centrage..)

Si quelqu'un a une brillante idée, merci d'avance.

Voici mon code (bandeau+menu):

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
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"
 lang="fr">
<head>
  <link rel="File-List"
 href="historique_fichiers/filelist.xml" />
  <title>I.E.C. : version fran&ccedil;aise</title>
  <meta content="text/html; charset=iso-8859-15"
 http-equiv="Content-Type" />
  <meta content="text/css" http-equiv="Content-Style-Type" />
  <meta content="fr" http-equiv="Content-Language" />
<!--[if IE]> <style type="text/css"> html pre { width: 636px ; } </style> <![endif]-->
  <script type="text/javascript">
<!--
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
for (var i = 1; i<=10; i++) {
if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
}
if (d) {d.style.display='block';}
}
//-->
  </script>
  <style type="text/css">
<!--
body
{
margin: 10px 0 ;
width: 1018;
padding: 0 ;
text-align: center ;
overflow-x : hidden; font: 80% "Trebuchet MS", helvetica, sans-serif ;
background: #eef6e4 ;
}
/* On définit les marges haute et basse à 10px et les marges droite et gauche à 0 */
/* On met le padding à 0 pour le navigateur Opera qui définit des padding par défaut pour le body */
/* On utilise text-align: center ; pour Internet Explorer, c'est la seule façon de centrer les éléments de type block avec ce navigateur */
.centrage {
text-align: center;
}
div#conteneur
{
width: 1018px ;
margin: 0 auto ;
text-align: left ;
border: 1px solid #65aa67 ;
background: #fff ;
}
/* On définit la largeur de la division qui contient l'ensemble de la page à 1018 pixels */
/* margin: 0 auto ; est la méthode correcte pour centrer les éléments de type
block (comme les divisions), nous centrons donc cette division */
/* Il faut rétablir l'alignement à gauche que nous avons changé plus haut */
h1#header
{
height: 83px ;
background: url(images/bando0609.png) no-repeat left top;
margin:0;
}
h1#header a
{
width: 400px ;
height: 70px ;
display: block ;
position: relative ;
left: 350px ;
top: 15px ;
text-indent: -5000px ;
}/* On donne les mêmes dimensions au lien, chose
possible grâce à la propriété display: block ; qui transforme le lien
en élément de type block, auquel on peut donner des propriétés de taille.
On met aussi l'image de fond qui a les mêmes dimensions que le cadre ainsi créé */
/* Le text-indent négatif est fait pour pouvoir ne
cacher le texte hors de la page, ce que nous voulons. Ainsi il reste
exploitable pour les syntèses vocales */
dl, dt, dj, dd, ul, li {
margin: 0;
padding: 0;
list-style-type: none;
}
ul#menu
{
position: absolute;
margin: 0 auto;
padding: 0 ;
list-style-type: none ;
top: 0;
width: 100%;
}
/* On donne une hauteur au menu, correspondant a
la taille de l'image utilisée en fond, on met ensuite l'image de fond
avec un décalage de 25 pixels vers le haut pour utiliser la technique de roll over expliquée dans un autre tutoriel; */
#menu dl {
float: left;
width: 11em;
color: #FFFFFF;
margin: 0 1px;
}
#menu dt {
margin: 0px; padding: 0pt;
cursor: pointer;
text-align: center;
font-weight: bold;
color: #FFFFFF;
background: #65aa67;
font-size: 12px;
border: 1px solid gray;
border-color:#FFFFFF;
}
#menu dj {
cursor: pointer;
text-align: center;
font-weight: bold;
color: #FFFFFF;
background: #65aa67;
font-size: 12px;
width: 25px;
}
#menu dd {
border: 1px solid gray;
}
#menu li
{
background: #65aa67;
color: #FFFFFF;
text-align: center ;
}/* On rend les li en flottant pour pouvoir les
afficher horizontalement, on cache les puces, et on centre le texte */
ul#menu li a, #menu dt a
{
height: 100%;
color: #fffff ;
display: block ;
text-decoration: none ;
border: 0px none;
}/* C'est sur les liens que le gros du travail est
effectué, largeur, hauteur de ligne, taille de police, graisse de police,
espacement des lettres, couleur, bordure et decoration du texte. Nous pouvons dimensionner les a grâce à la propriété display: block ; */
#menu li a:hover, #menu dt a:hover
{
background: #990066 ;
}/* Et pour finir on décale l'image de fond au passage
de la souris pour laisser aparaître l'état survolé de l'image, voir le tutoriel sur les roll over pour plus de détails */
div#contenu
{
padding: 0 10px 0 10px ;
background: url(images/logoIECfond.jpg) no-repeat 0px 0px ;
}
/* On ajoute un petit élément décoratif sur le côté
de la page et on crée un espace à gauche et à droite du contenu */
/* On définit la hauteur de la partie header, contenant le titre du site */
div#contenu h2
{
padding-left: 25px ;
line-height: 37px ;
font-size: 25px;
color: #990066 ;
border-bottom: 1px solid #db70db;
}
/* Mise en forme du titre de page, une petite image,
on décale le texte en fonction de l'image, on donne un couleur au texte et
on met une bordure basse */
div#contenu p
{
text-align: justify ;
text-indent: 2em ;
line-height: 1.7em ;
}
/* On rend les paragraphes plus propre, alignement justifié,
alinéa et hauteur de ligne supérieure à l'état normal pour aérer le tout */
div#contenu a
{
color: #65aa67 ;
}
div#contenu a:hover
{
color: #990066;
}
#global 
{ 
margin-left: auto; 
margin-right: auto; 
width: 1018; 
text-align: left; 
/* on rétablit l'alignement normal du texte */ 
}
#site {
position: absolute;
z-index: 1;
top : 70px;
margin: 0 auto;
color: #65aa67;
background-color: #990066;
padding: 5px;
border: 1px solid gray; }
a {text-decoration: none;
color: black;
color: #990066;
}
a:link {
color:white;
text-decoration:none;
background-color:65aa67;
}
a:visited {
color:white;
text-decoration:none;
background-color:65aa67;
}
a:hover {
color:white;
text-decoration:none;
background-color:990066;
}
a:active {
color:white;
text-decoration:none;
background-color:65aa67;
}
/* On met en forme les liens contenu dans la page */
p#footer
{
margin: 0 ;
padding-right: 10px ;
line-height: 30px ;
text-align: right ;
color: #65aa67 ;
}
pre
{
overflow: auto ;
background: #db70db ;
border: 2px solid #9b2 ;
padding: 5px 0 0 5px ;
font-size: 1.2em ;
}
/* En passant on définit l'overflow de la balise pre à auto pour permettre d'afficher des barres de défilement si le texte contenu
dans cette balise est trop grand */
pre span
{
color: #990066 ;
}
/* Couleur de texte des éléments compris dans des span
eux mêmes compris dans un pre */
pre span.comment
{
color: #db70db ;
}
/* Couleur différente pour les span.comment, les span
utilisés pour les commentaires */
/* On doit donner une largeur au <pre> à cause d'Internet Explorer, on ne va donc l'appliquer qu'à Internet Explorer en utilisant le commentaire conditionnel suivant, à placer dans la partie HTML, et plus précisément dans l'élément <head> : */
  </style>
</head>
<body style="color: rgb(0, 0, 0);" alink="#ee0000"
 link="#0000ee" vlink="#551a8b">
<div style="text-align: center;" id="conteneur">
<h1 id="header"><a href="historique.htm"
 title="Historique"><span>Historique</span></a></h1>
<div id="contenu">
<div style="left: 0px; width: 1419px;" id="menu">
<dl>
  <dt onmouseover="javascript:montre('smenu1');">Pr&eacute;sentation
I.E.C.</dt>
  <dd style="color: rgb(255, 255, 255);" id="smenu1">
    <ul
 style="background-color: rgb(101, 170, 103); background-image: none; background-repeat: repeat; background-attachment: scroll; color: rgb(255, 255, 255);">
      <li><a target="pagehtml" style="color: white;"
 href="historique.htm">Historique</a></li>
      <li style="color: rgb(255, 255, 255);"><a
 style="color: white;" href="panel_IEC.htm">Panel
I.E.C. Group</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="qualit%E9.htm">I.E.C.
Qualit&eacute;</a></li>
    </ul>
  </dd>
</dl>
<dl style="color: rgb(255, 255, 255);">
  <dt onmouseover="javascript:montre('smenu2');">Activit&eacute;s
I.E.C.</dt>
  <dd style="color: rgb(255, 255, 255);" id="smenu2">
    <ul style="background-color: rgb(101, 170, 103);">
      <li style="background-color: rgb(101, 170, 103);"><a
 target="pagehtml" style="color: white;"
 href="securite.htm">T<span>ests
de
S&eacute;curit&eacute;</span></a></li>
      <li style="background-color: rgb(101, 170, 103);"><a
 target="pagehtml" style="color: white;"
 href="tests_eff.htm">Tests
d'Efficacit&eacute;</a></li>
      <li style="background-color: rgb(101, 170, 103);"><a
 target="pagehtml" style="color: white;"
 href="tests_inv.htm">Essais
In vitro</a></li>
      <li style="background-color: rgb(101, 170, 103);"><a
 target="pagehtml" style="color: white;"
 href="test_conso.htm">Tests
Consommateurs</a></li>
      <li style="background-color: rgb(101, 170, 103);"><a
 target="pagehtml" style="color: white;"
 href="anal_senso.htm">Analyse
Sensorielle</a></li>
    </ul>
  </dd>
</dl>
<dl style="color: rgb(255, 255, 255);">
  <dt onmouseover="javascript:montre('smenu3');">I.E.C.
dans le monde</dt>
  <dd id="smenu3">
    <ul style="background-color: rgb(101, 170, 103);">
      <li><a target="pagehtml" style="color: white;"
 href="filiales.htm">Filiales</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="iec_japon.htm">I.E.C.
Japon</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="iec_singapour.htm">I.E.C.
Singapour</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="iec_coree.htm">I.E.C.
Cor&eacute;e</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="iec_bulgarie.htm">I.E.C.
Bulgarie</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="iec_espagne.htm">I.E.C.
Espagne</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="iec_afrique.htm">I.E.C.
Afrique du Sud</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="iec_chine.htm">I.E.C.
Chine</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="iec_inde.htm">I.E.C.
Inde</a></li>
    </ul>
  </dd>
</dl>
<dl style="color: rgb(255, 255, 255);">
  <dt onmouseover="javascript:montre('smenu4');">Espace
Volontaires</dt>
  <dd id="smenu4">
    <ul style="background-color: rgb(101, 170, 103);">
      <li><a target="pagehtml" style="color: white;"
 href="qui_sommes_nous.htm">Qui
sommes nous ?</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="rens.htm">Inscriptions</a></li>
      <li><a target="pagehtml" style="color: white;"
 href="corps%20annonces.php">Annonces</a></li>
    </ul>
  </dd>
</dl>
<dl style="color: rgb(255, 255, 255);">
  <dt onmouseover="javascript:montre();"><a
 style="color: white;" target="pagehtml"
 href="contact_vous.htm">Nous
contacter</a></dt>
</dl>
<dl style="color: rgb(255, 255, 255);">
  <dt onmouseover="javascript:montre();"><a
 style="color: white;" target="pagehtml"
 href="offres%20emplois.htm">Offres
d'emplois</a></dt>
</dl>
<dl style="color: rgb(255, 255, 255);">
  <dj onmouseover="javascript:montre();"><a
 title="Anglais" target="pagehtml"
 href="historique_en.htm"><img src="images/england2.jpg"
 align="right" border="0" /></a></dj> <dj
 onmouseover="javascript:montre();"><a title="Fran&ccedil;ais"
 target="pagehtml" href="historique.htm"><img
 src="images/france2.jpg" align="right" border="0" /></a></dj>
</dl>
</div>
</div>
</div>
</body>
</html>