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

Mise en page CSS Discussion :

resolution de navigateur


Sujet :

CSS

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre actif
    Inscrit en
    Octobre 2010
    Messages
    35
    Détails du profil
    Informations forums :
    Inscription : Octobre 2010
    Messages : 35
    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???

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

    Informations professionnelles :
    Activité : Architecte logiciel
    Secteur : Finance

    Informations forums :
    Inscription : Septembre 2004
    Messages : 1 612
    Par défaut
    Bonjour,

    Sans code, on ne pourra pas te venir en aide.

  3. #3
    Membre actif
    Inscrit en
    Octobre 2010
    Messages
    35
    Détails du profil
    Informations forums :
    Inscription : Octobre 2010
    Messages : 35
    Par défaut
    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 : 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
     
     
    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

  4. #4
    Invité
    Invité(e)
    Par défaut
    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 : 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
     
    <!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>

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

Discussions similaires

  1. [TP]Utilisation de la souris en haute résolution
    Par Gabi dans le forum Turbo Pascal
    Réponses: 4
    Dernier message: 08/01/2004, 18h46
  2. [VB6]Résolution d'IP
    Par Sadneth dans le forum VB 6 et antérieur
    Réponses: 37
    Dernier message: 04/01/2004, 00h03
  3. Réponses: 2
    Dernier message: 21/07/2003, 12h22
  4. (Debutant) resolution et fps
    Par silverdelph dans le forum DirectX
    Réponses: 4
    Dernier message: 12/07/2003, 12h50
  5. [Kylix] Resolution e Kylix
    Par ulisse dans le forum EDI
    Réponses: 1
    Dernier message: 02/03/2003, 15h57

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