Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > CSS
CSS Forum d'entraide sur l'utilisation des feuilles de style CSS. Avant de poster : Cours CSS, FAQ CSS, Galerie CSS
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 19/11/2010, 10h53   #1
Invité de passage
 
Inscription : novembre 2007
Messages : 14
Détails du profil
Informations forums :
Inscription : novembre 2007
Messages : 14
Points : 0
Points : 0
Par défaut Différences d'affichage de table avec IE et FF

Bonjour,

Voila j'ai un problème de compatibilité d'affichage entre Firefox et internet explorer. au niveaux des images sur les différentes pages ainsi que sur le centrage global du site sur IE

voici mon site : http://ngarnier.eu

Mon index.php est programmé comme cela :
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
<?php
 
// Message
$message = '';
 
// Chargement de la page
$page = 'accueil';
 
if(!empty($_GET['page'])){
	$page = $_GET['page'];
}
 
if(!is_file($page.'.page.php')){
	$message = 'Page '.$page.' introuvable';
	$page = 'accueil';
}
 
// Affichage du menu
function displayMenu(){
	?>
	<table class="menu" cellpadding="0" cellspacing="0">
		<tr><td><u>Menu<u></td></tr>
		<tr><td class="item"><a href="?page=accueil">Curriculum vitae</a></td></tr>
		<tr><td><u>Carte de contrôle<u></td></tr>
		<tr><td class="item"><a href="?page=historique">Historique</a></td></tr>
		<tr><td class="item"><a href="?page=shewart">Carte Shewart</a></td></tr>
		<tr><td class="item"><a href="?page=bibliographie">Bibliographie</a></td></tr>
		<tr><td class="item"><a href="?page=liens">Liens</a></td></tr>
		<tr><td class="item"><a href="?page=telechargements">Téléchargements</a></td></tr>
		<tr><td class="item"><a href="?page=contacts">Me contacter</a></td></tr>
	</table>
	<?php
}
 
 
 
//<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
?>
<html>
	<head>
		<script type="text/javascript" src="js/general.js">
		</script>
		<link rel="stylesheet" type="text/css" href="style/style.css" />
		<title>Garnier Nicolas</title>
	</head>
	<body>
		<table class="page" cellpadding="0" cellspacing="0">
			<tr>
				<td class="head">
					<table class="thead" cellpadding="0" cellspacing="0">
						<tr>
							<td>
								<?php echo date('j M Y - H:i');?>
							</td>
							<td class="right">
								Garnier Nicolas
							</td>
						</tr>
					</table>
				</td>
			</tr>	
			<tr>
				<td>
					<table class="banniere" cellpadding="0" cellspacing="0">
						<tr>
							<td class="logo_iut"><img src="style/images/logo.gif" width="150px">
							</td>
							<td class="infos"><a class="noms">Projet tutoré de Garnier Nicolas</a><br/><br/>
								Licence Professionnelle Ingénierie de la Métrologie et de la Qualité<br/><br/>
								Portant sur les cartes Shewart et Cusum
							</td>
						</tr>
					</table>
				</td>
			</tr>	
			<tr>
				<td class=""><? include($page.'.page.php'); ?>
				</td>
			</tr>		
			<tr>
				<td class="foot">
					Copyright &copy; 2010 Garnier - Tous droits réservés  <br/>
					Site optimisé pour Mozilla Firefox
				</td>
			</tr>		
		</table>
 
		<div class="message"><?php echo $message; ?></div>
		<?php //<div class="message"><img src="style/images/logo.gif"></div>?>
 
 
 
	</body>
</html>
Et mon style.css comme cela :

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
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
html, body{
	padding: 0px;
	margin: 0px;
	width: 100%;
	height: 100%;
}
 
table{
	font: 12px Verdana, "Lucida Grande";
	color: #FFFFFF;
}
 
.hidden{
	display: none;
}
 
.bloc{
	display: bloc;
}
 
.right{
	text-align: right;
 }
 
.page{
	margin: 0px auto;
	margin-top: 50px;
	border: 1px solid #333;
	height: 150px;
	width: 678px;
	font: 12px Verdana, "Lucida Grande";
	color: #FFFFFF;
}
 
input, select{
	border: 1px solid #AAA;
	font: 10px Verdana, "Lucida Grande";
}
 
/* Menu */
.page .menu{
	padding: 10px;
	border: 0px solid #333;
	width: 100%;
	height: 100%;
	font: 12px Verdana, "Lucida Grande";
	color: #FFFFFF;
	background: #808080;
}
 
.page .menu .item{
	padding: 2px;
	padding-left: 20px;
}
 
.page .menu a{
	text-decoration: none;
	color: #FFF;
}
 
.page .menu a:hover{
	color: #AAA;
}
 
/* General */
.page .head{
	background: #808080;
	padding: 5px;
	border-bottom: 1px solid #333;
}
 
.page .thead{
	width: 100%;
}
 
.page .banniere{
	border: 0px solid #AAA;
	width: 100%;
	text-align: center;
	border-bottom: 1px solid #333;
}
 
.page .banniere .logo_iut{
	background: transparent url('images/fond_iut.png') no-repeat;
	width: 187px;
	height: 133px;
	border-right: 1px solid #333;
}
 
.page .banniere .infos{
	background: transparent url('images/fond_ban.png') no-repeat;
	color: #358;
	font-style: italic;
	font-weight: bold;
}
 
.page .banniere .infos .noms{
	color: #333;
	font-style: italic;
	font-weight: bold;
}
 
.page .foot{
	background: #808080;
	padding: 10px;
	text-align: center;
}
 
.page .description{
	border-top: 1px solid #333;
	border-bottom: 1px solid #333;
	background: #DDD;
	padding: 5px;
	color: #016;
	font-size: 10px;
}
 
/* Accueil */
.page .accueil{
	width: 100%;
}
 
.page .accueil .td_menu{
	width: 150px;
	height: 193px;
	border-right: 1px solid #333;
}
 
.page .accueil .image{
	background: transparent url('images/accueil.png') no-repeat;
}
 
/*historique*/
.page .historique{
	width: 100%;
}
 
.page .historique .td_menu{
	width: 150px;
	height: 193px;
	border-right: 1px solid #333;
}
 
.page .historique .image{
	background: transparent url('images/main2.png');
}
 
/*historiquee*/
.page .historiquee{
	width: 100%;
}
 
.page .historiquee .td_menu{
	width: 150px;
	height: 193px;
	border-right: 1px solid #333;
}
 
.page .historiquee .image{
	background: transparent url('images/main2.png');
}
 
/*Bibliographie*/
.page .bibliographie{
	width: 100%;
}
 
.page .bibliographie .td_menu{
	width: 150px;
	height: 193px;
	border-right: 1px solid #333;
}
 
.page .bibliographie .image{
	background: transparent url('images/main3.png');
}
 
/*liens*/
.page .liens{
	width: 100%;
}
 
.page .liens .td_menu{
	width: 150px;
	height: 193px;
	border-right: 1px solid #333;
}
 
.page .liens .image{
	background: transparent url('images/main4.png');
}
 
/*telechargement*/
.page .telechargements{
	width: 100%;
}
 
.page .telechargements .td_menu{
	width: 150px;
	height: 193px;
	border-right: 1px solid #333;
}
 
.page .telechargements .image{
	background: transparent url('images/main6.png');
}
 
/*contacts*/
.page .contacts{
	width: 100%;
}
 
.page .contacts .td_menu{
	width: 150px;
	height: 193px;
	border-right: 1px solid #333;
}
 
.page .contacts .image{
	background: transparent url('images/main5.png');
}
 
/* Shewart */
.page .shewart{
	width: 100%;
}
 
.page .shewart .td_menu{
	width: 180px;
	height: 193px;
	border-right: 1px solid #333;
}
 
.page .shewart .image{
	background: transparent url('images/shewart.jpg');
}
 
.page .shewart .description .inputs{
	color: #016;
	font-size: 10px;
	width: 100%;
}
 
.page .shewart .description .inputs td{
	width: 7%;
}
 
.page .shewart .description .inputs .datas{
	color: #016;
	font-size: 10px;
	width: 100%;
	text-align: center;
}
 
.page .shewart .description .inputs a{
	font-variant: small-caps;
	text-decoration: none;
	color: #D52;
	font-size: 12px;
	font-weight: bold;
}
 
.page .shewart .description .inputs input{
	width: 40px;
	text-align: center;
}
 
/* Message */
.message{
	margin-top: 10px;
	text-align: center;
	font: 12px Verdana, "Lucida Grande";
	font-style: italic;
	font-variant: small-caps;
	color: #F00;
}
Si quelqu'un pouvait me donner quelques conseils pour centre la page sur IE et que les images y apparaissent comme il faut

Merci d'avance
Combomaster est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 19/11/2010, 11h48   #2
Membre éprouvé
 
Avatar de Sayrus
 
Inscription : décembre 2005
Messages : 818
Détails du profil
Informations personnelles :
Âge : 27

Informations forums :
Inscription : décembre 2005
Messages : 818
Points : 456
Points : 456
Salut,

Petite remarque d'abord, les tables HTML ne sont pas faites pour présenter en site entier, je veux dire, il faut utiliser des DIV et non des tables...

Les tables s'utilises pour présenter du contenu structurer, par exemple, des listings,...

Avec une div c'est super simple de centrer ton site surtout si il a une taille fixe:

Code :
1
2
3
4
5
6
7
8
9
10
<html>
<head>
 
<div id="wrapper">
 
{contenu de ton site}
 
</div>
</head>
</html>
CSS
Code :
#wrapper{width:980px; margin:0 auto;}
__________________
Solutions pour concessions et garages automobiles =>
http://www.fastback.be
Sayrus est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 19/11/2010, 13h15   #3
Membre régulier
 
Inscription : octobre 2010
Messages : 101
Détails du profil
Informations personnelles :
Localisation : France, Seine Maritime (Haute Normandie)

Informations forums :
Inscription : octobre 2010
Messages : 101
Points : 71
Points : 71
Les tables HTML peuvent être interprétée différemment sur IE que sur firefox.

En effet il serait préférable que tu utilises des div qui sont interprétés de la même manière et surtout moins 'bordélique' à la lecture.

Sinon tu peux essayer ce genre de chose :

Code :
1
2
3
4
<table border="1" bordercolor="#81C622" width="100%" cellpadding="1" cellspacing="1" bgcolor="#81C622">
<!--[if lte IE 7]>
            <table border="0" bordercolor="#FFFFFF" width="100%" cellpadding="1" cellspacing="1" bgcolor="#81C622">
<![endif]-->
A l'intérieur de la balise <!--[if lte IE 7]><![endif]--> tu définis ta table lorsque le navigateur est IE version < 7
proxichou est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/11/2010, 15h16   #4
Invité de passage
 
Inscription : novembre 2007
Messages : 14
Détails du profil
Informations forums :
Inscription : novembre 2007
Messages : 14
Points : 0
Points : 0
J'ai essayé d'introduite les div dans mes plages de programmation et de regarder sur le site du zero mais impossible de recentrer la page sur ie.

je dois mal m'y prendre je pense
Combomaster 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 10h04.


 
 
 
 
Partenaires

Hébergement Web