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 10/06/2011, 21h13   #1
 
dosse imad
Inscription : octobre 2010
Messages : 31
Détails du profil
Informations personnelles :
Nom : dosse imad

Informations forums :
Inscription : octobre 2010
Messages : 31
Points : -5
Points : -5
Par défaut resolution de navigateur

salut,

j'ai un probleme au niveau de mon site,lorsque je reduis la fenetre de navigateur,le site se melange ,les bloques de mon site chevauchent.

j'utilise les margin top-left-bottom-right dans la css de chaque <div> dans mes page???
imadosse est déconnecté   Envoyer un message privé Réponse avec citation 01
Vieux 10/06/2011, 21h52   #2
Modérateur
 
Avatar de Nesmontou
 
Homme Benjamin PREVOT
Architecte de système d'information
Inscription : septembre 2004
Messages : 1 568
Détails du profil
Informations personnelles :
Nom : Homme Benjamin PREVOT
Âge : 30
Localisation : France, Nord (Nord Pas de Calais)

Informations professionnelles :
Activité : Architecte de système d'information
Secteur : Finance

Informations forums :
Inscription : septembre 2004
Messages : 1 568
Points : 2 493
Points : 2 493
Bonjour,

Sans code, on ne pourra pas te venir en aide.
__________________
Si vous ne pouvez expliquer un concept à un enfant de six ans, c'est que vous ne le comprenez pas complètement. Albert EINSTEIN

F.A.Q. : Java, PHP, (X)HTML / CSS

N'oubliez pas de cliquer sur le bouton Résolu en bas de page quand vous avez obtenu une solution à votre problème
Nesmontou est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 10/06/2011, 22h06   #3
 
dosse imad
Inscription : octobre 2010
Messages : 31
Détails du profil
Informations personnelles :
Nom : dosse imad

Informations forums :
Inscription : octobre 2010
Messages : 31
Points : -5
Points : -5
eh bah c'est défficile de vous donner tous les CSS de mes page.
mais je vais vous donner le CSS de ma page d'acceuil c'est presque la meme chose que pour les autres pages, le voila:

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
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
 
 
body
{
font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size:16px;
width:auto;
height:auto;
margin-left:5%;
 
}
.panier
{
	margin-top:-81%;
	margin-left:71%;
	float:left;
	border-style:groove;
	border-color:#900;
	background-color:#F96;
	width:350px;
	height:50px;
	font-size:13px;
}
.entet
{
	font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
	font-size:18px;
	color:#C00;
	vertical-align:middle;
 
	}
.acc{
 
 
	background-image:url(../img/07atn_.jpg);
	margin-top:-5%;
	list-style-type: none;
	margin-left:27%;
	float:left;
	width:102px;
	height:43px;
	text-align:center;
	background-position:center;
 
 
}
.contact{
 
 
	background-image:url(../img/07atn_.jpg);
	margin-top:-5%;
	list-style-type: none;
	margin-left:37%;
	float:left;
	width:102px;
	height:43px;
	text-align:center;
	background-position:center;
 
 
}
.plan
{
   	margin-top:-5%;
	list-style-type:none;
	margin-left:47%;
	float:left;
	background-image:url(../img/07atn_.jpg);
    width:102px;
	height:43px;
	text-align:center;
	background-position:center;
	}
.recherche
{
	float:right;
	margin-top:-3%;
 
}
 
.tags
{
	background-image:url(../img/binder_sidebartn_.jpg);
	margin-top:5%;
	border-style:groove;
	text-align:center;
	font-family:Georgia, "Times New Roman", Times, serif;
	font-size:18px;
	color:#00F;
	width:150px;
	height:20px;
}
.tags1
{
	margin-top:-1.4em;
	background-image:url(../img/903stco.gif);
	width:255px;
	height:50px;
	}
 
.catego
{
	border-style:groove;
	margin-top:2%;
	background-image:url(../img/binder_sidebartn_.jpg);
	text-align:center;
	font-family:Georgia, "Times New Roman", Times, serif;
	font-size:18px;
	color:#00F;
	width:150px;
	height:20px;
}	
.catego1
{
    margin-top:-1.2em;	
	background-image:url(../img/903stco.gif);
	width:255px;
	height:80px;
	}
 
.fabr
{
	border-style:groove;
	margin-top:2%;
	background-image:url(../img/binder_sidebartn_.jpg);
	text-align:center;
	font-family:Georgia, "Times New Roman", Times, serif;
	font-size:18px;
	color:#00F;
	width:150px;
	height:20px;
}
.fabr1
{
	margin-top:-1.2em;	
	background-image:url(../img/903stco.gif);
	width:255px;
	height:80px;
}
.inf
{
border-style:groove;
	margin-top:4%;
	background-image:url(../img/binder_sidebartn_.jpg);
	text-align:center;
	font-family:Georgia, "Times New Roman", Times, serif;
	font-size:18px;
	color:#00F;
	width:150px;
	height:20px;	
}
.inf1
{
	margin-top:-1.2em;	
	background-image:url(../img/903stco.gif);
	width:255px;
	height:130px;
}
.redu
{
	margin-left:79%;
	margin-top:18%;
	float:left;
	border-style:groove;
 
	background-image:url(../img/binder_sidebartn_.jpg);
	text-align:center;
	font-family:Georgia, "Times New Roman", Times, serif;
	font-size:18px;
	color:#00F;
	width:150px;
	height:20px;	
}
.redu1
{
margin-left:79%;
	margin-top:-1.2em;
	float:left;
	background-image:url(../img/903stco.gif);
	width:255px;
	height:230px;	
}
 
.produit
{
	margin-left:79%;
	margin-top:-51%;
	width:250px;
	height:auto;
	border-style:groove;
	border-color:#03F;
	float:left;
	background-image:url(../img/903stco.gif);
 
}
.nouveauproduit
{
	margin-top:-48%;
	margin-left:79%;
	border-style:groove;
	background-image:url(../img/binder_sidebartn_.jpg);
	text-align:center;
	font-family:Georgia, "Times New Roman", Times, serif;
	font-size:18px;
	color:#00F;
	width:250px;
	height:30px;	
 
}
.produit1
{
 
	list-style-type:none;
	width:auto;
	height:auto;
	font-size:15px;
}
.produit2
{
 
	font-size:13px;
 
 
}
 
.lreduction
{
	list-style-type:none;
	float:left;
}
.ttpromo
{
	padding-top:35%;
}
.maga
{
 
	margin-top:-36%;
	float:left;
	border-style:groove;
 
	background-image:url(../img/binder_sidebartn_.jpg);
	text-align:center;
	font-family:Georgia, "Times New Roman", Times, serif;
	font-size:18px;
	color:#00F;
	width:150px;
	height:20px;	
}
.maga1
{
 
	margin-top:-34%;
	float:left;
	background-image:url(../img/903stco.gif);
	width:255px;
	height:200px;
 
}
.pied
{
	margin-top:34%;
	margin-left:8%;
	height:auto;
 
}
.lpied
{
	list-style-type:none;
	float:left;
	padding-left:2%;
}
 
.nom
{
	color:#903;
	font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
	font-size:large;
	font-style:oblique;
}
.presenter
{
	margin-top:-83%;
	margin-left:22%;
	float:left;
	width:900px;
	height:auto;
}
.present
{
	color:#900;
	font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
	font-size:14px;
}
.presenter1
{
	color:#00F;
	font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
width:600px;
}
.image
{
	float:left;
}
à vous de jouer,

merci
imadosse est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/06/2011, 01h29   #4
Membre régulier
 
Avatar de kéraunos
 
Homme
Inscription : janvier 2005
Messages : 157
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations forums :
Inscription : janvier 2005
Messages : 157
Points : 71
Points : 71
Oulah... Je laisserai plus patient que moi farfouiller dans ton code.

En attendant, la propriété min-width peut être ton amie pour les zones que tu souhaites
  • laisser s'élargir en fonction de la largeur de la fenêtre
  • MAIS que tu ne veux pas voir écrasées quand tu réduis ladite fenêtre

Dans le code suivant, c'est le cas par exemple du div #page auquel j'attribue une largeur minimale de 800px. Si tu observes le code, tu remarqueras que cette limite permet mathématiquement d'obtenir une largeur minimale de 400px pour le div #content.

Il y a bien sûr des tas de manières d'utiliser min-width.
Pour avoir le même genre d'effet, tu peux également, à l'intérieur d'un div contenant, centrer horizontalement un div contenu dont tu as fixé la largeur (propriété width, tout simplement).

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
 
<!doctype html> 
<html lang="fr"> 
 
<head> 
	<meta charset="utf-8" /> 
	<title>sans titre</title>
	<style>
		html,body {
			padding: 0px;
			margin: 10px 0px;
		}
		#page {
			min-width: 800px;
			/* préserve une largeur minimum de 400px pour #content */
		}
		#left {
			float: left;
			width: 150px;
			background: green;
		}
		#right {
			float: right;
			width: 150px;
			background: blue;
		}
		#content {
			margin-left: 200px;
			margin-right: 200px;
			background: yellow;
		}
	</style>
</head> 
 
<body>
	<div id="page">
		<div id="left">
			<p>à gauche</p>
		</div>
 
		<div id="right">
			<p>à droite</p>
		</div>
 
		<div id="content">
			<p>au milieu, largeur minimum de 400px</p>
		</div>
	</div>
</body>
</html>
kéraunos est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 05h02.


 
 
 
 
Partenaires

Hébergement Web