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 :

menu de gauche pas aligné comme voulu


Sujet :

CSS

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éprouvé
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    1 571
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 1 571
    Par défaut menu de gauche pas aligné comme voulu
    Bonjour tout le monde,

    Je suis entrain de créer un site web marchand mais actuellement j'ai un souci c'est à dire sur mon site, j'ai un menu verticale et un horizontale, ce dernier qui se situe à gauche de ma page j'aimerais qu'il soit complétement à gauche.
    Voici en image, ce que j'obtiens pour le moment :


    Voici le code html de la page :
    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
    <!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>
    		<title>Moto 28 - Vente de Moto neuf</title>
    		<link rel="shortcut icon" href="favicon.ico" />
    		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
    		<meta http-equiv="content-language" content="fr" />
    		<meta http-equiv="Content-Style-Type" content="text/css" />
    		<link href="top/css/style.css"	title="Défaut" rel="stylesheet" type="text/css" media="screen" />
    		<script type="text/javascript" src="jQuery/jquery-1.3.2.min.js"></script>
    		<script type="text/javascript" src="contenu/js/menu_MotoNeuve.js"></script>
    		<!--<script language="JavaScript" src="http://www.traducteurenligne.net/traducteurgr/flags.js"></script>-->
    	</head>
    	<body style="background-color:black;">	
    		<div id="conteneur">
    			<div id="header" style="background-color:#ff6f00;"></div> 
    			<ul id="menu"><!-- Menu horizontal -->
    				<li><img src="images_gabarit/bouton.jpg" width="200" height="40" alt=""/></li>
    				<li><a href="Index.php?">Accueil</a></li>
    				<li><a href="#">Présentation</a></li>
    				<li><a href="contenu/pop.html" target="_blank">Conditions</a></li>
    				<li><a href="#">Panier</a></li>
    				<li><a href="#">Contact</a></li>
    				<li><a href="#">Favoris</a></li>
    			</ul><!-- Fin Menu horizontal -->
     
    			<div id="left"><!-- Colonne de gauche -->
    				<div class="vertical">
    					<div class="navigation">Moto</div>
    					<span id="neuf">Neuve</span>
    				</div> 
    				<div class="vertical">
    					<div class="navigation">Zone Membre</div>
    					<?php if(isset($_COOKIE["moto_28"]))
    						{
    						?>
    							<a href="contenu/Controle/C_deconnexion.php">D&eacute;connexion</a>
    							<a href="Index.php?action=mon_compte">Mon Compte</a>
    							<a href="#">Mon Panier</a>
    						<?php
    						}
    						else
    						{
    							include("contenu/Vue/V_connexion.php");
    							?>
    								<a href="Index.php?action=inscription">S'inscrire ?</a>
    								<a href="Index.php?action=mdp_oublie">Mot de passe oublié</a>
    							<?php
    						}
    						?>
    						<!--<a href="#">Lien 1</a>
    						<a href="#">Lien 2</a>
    						<a href="#">Lien 3</a>
    						<a href="#">Lien 4</a>
    						<a href="#">Lien 5</a>-->
    				</div><br /> 
    			</div><!-- Fin Colonne de gauche -->  
    			<br />
    			<div id="right"><!-- Colonne de Droite -->	 
    				<div id="texte">
    					<?php
    						// include permet d'exécuter le controleur suivant : controleur du corp
    						include ("top/corps.php");
    					?>
    				</div>
    			</div><!-- Fin Colonne de Droite -->   	  
     
    			<div id="pied">
    				<!-- mention de copyright Ne pas retirer sans autorisation écrite -->
    				<div class="copyright">©<a href=""> Votresite.com</a> 2009 | Design by<a href="http://www.kitgraphiquegratuit.org" onclick="window.open(this.href); return false;" title="kits gratuits" > Kitgraphiquegratuit.org</a></div>
    				<!-- mention de copyright Ne pas retirer sans autorisation écrite -->	
    			</div> 
    		</div>
    	</body>
    </html>
    Voici le code CSS correspondant à la page :
    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
    /*copyright by kitgraphiquegratuit.org*/
    body       
    {
    	margin : 0px; 
            padding : 0px;  
            text-align: center;
    }	
     
    #conteneur 
    {
    	margin: 0 auto 0;
    	position: relative;
    	width: 800px;
    	background:#fff;
    }  	 
     
    #header    
    {
    	height:134px; 
    	background:url(../../images_gabarit/ban.jpg) no-repeat top; 
    	margin: 0 auto 0 auto;
    } 	
     
    #left   
    {
    	float:left;
    	width: 190px;
    	margin:0 auto 0 auto;
    	text-align:center;
    }
     
    #right  
    {
    	float : right;
    	width:596px;
    	margin:70px;
    	color:#9d9d9d;
    	text-align:left;
    } 
     
    #pied  	
    {
    	height:40px;
    	background-color:#ff6f00; 
    	margin: 0 auto 0 auto;
    	width:800px;
    	clear: both;
    }
     
     
     /*Pied*/
    .separateur	
    { 
    	clear: both;
    	visibility: hidden; 
    } 
     
     
    /*Menu horizontal*/
    #menu                  
    {
    	padding : 0;
    	margin : 0; 
    	list-style : none;
    	text-align : center;
    	font-family: verdana ; 
    	font-size: 15px;
    	width:800px;
    }
     
    #menu a               
     {
    	display : block;
    	height:40px;
    	color: #9d9d9d;
    	text-decoration : none;
    	line-height:40px;
    	width: 100px;
    	background: url(../../images_gabarit/bouton.jpg) no-repeat top ; 
    	outline:none; 
    	font:bold 12px/40px Verdana;
    }
     
    #menu li                
    {
    	float : left;
    }
     
    #menu a:hover     
    {
    	background: url(../../images_gabarit/bouton_hover.jpg);
    }	 			
     
    .navigation          
    { 
    	height:20px;
    	background:url(../../images_gabarit/menu.jpg) top;
    	width:150px;
    	color:#9d9d9d;
    	border-bottom:1px solid white;
    	padding:5px 0 5px 0;
    }
     
    div.vertical           
    {
    	float : left;
    	margin:10px auto 0 auto;
    	padding:0;
    	width:150px;
    	text-decoration: none;
    	list-style: none;
    	border-bottom:1px solid white;
    	text-align:center;
    }
     
    div.vertical a       
    {
    	background:#b6b3b3;
    	text-align:left;
    	width:140px;
    	height:30px;
    	display: block;
    	line-height:30px;
    	color: #fff;
    	font:bold 14px/30px "trebuchet ms";
    	text-decoration: none;
    	border-bottom:1px solid white;
    	padding:0 5px 0 5px;
    }
     
    div.vertical a:hover 
    {
    	color: #fff;
    	background:#fda910;
    }   
     
    div.vertical table{
    	background:#b6b3b3;
    	width:150px;
    }
     
    ul.vertical           
    {
    	margin:10px auto 0 auto;
    	padding:0;
    	width:150px;
    	text-decoration: none;
    	list-style: none;
    	border-bottom:1px solid white;
    	text-align:center;
    }
     
    ul.vertical li a       
    {
    	background:#b6b3b3;
    	text-align:left;
    	width:140px;
    	height:30px;
    	display: block;
    	line-height:30px;
    	color: #fff;
    	font:bold 14px/30px "trebuchet ms";
    	text-decoration: none;
    	border-bottom:1px solid white;
    	padding:0 5px 0 5px;
    }
     
    ul.vertical li a:hover 
    {
    	color: #fff;
    	background:#fda910;
    }   
     
    .copyright           
    {
    	float:right;
    	padding:0;
    	margin :8px 10px 0 0;
    	color:#585b5d;
    	font:bold 12px "trebuchet ms";
    }
     
    .copyright a        
    {
    	color:#585b5d;
    	font:bold 12px "trebuchet ms";
    	text-decoration: none;
    	outline:none;
    }
     
    .copyright a:hover  
    {
    	color:#9d9d9d;
    }
     
    img, p, h1, h2, h3, h4, h5, h6, Span, object, table, td, tr
    {
    	border:0;
    	margin:0;
    	padding:0;
    }
     
    Span		   
    {
    	color:#ff6f00;
    	text-decoration:none;
    	outline:none;
    	font:bold 14px "trebuchet ms";
    }
     
    a                   
    {
    	color:#ff6f00;
    	text-decoration:underline;
    	outline:none;
    	font:bold 12px "trebuchet ms";
    }
     
    a:hover             
    {
    	color:#585b5d;
    }
    Quelqu'un à t-il une idée pour régler mon souci svp ?

    Merci d'avance.

  2. #2
    Membre confirmé
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    116
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 116
    Par défaut
    En regardant rapidement ta page ce qui empeche ton menu de venir à gauche est une image

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <li><img src="images_gabarit/bouton.jpg" width="200" height="40" alt=""/></li>
    Si tu la supprime, ton menu ira à gauche. Par contre tout ce qui en dessous remontera à la suite de ton menu...

    Il faudra rajouter clear:both; à ton id #left

  3. #3
    Membre éprouvé
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    1 571
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 1 571
    Par défaut
    Tout d'abord merci rollergirl d'avoir pris de ton temps.
    Donc j'ai réussit à faire ce que je souhaité grâce à ton aide.
    Voici ce que cela me donne :


    La page HTML est inchangé.

    Voici le code de la feuille de style CSS (en rouge les modifications) :
    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
    /*copyright by kitgraphiquegratuit.org*/
    body       
    {
    	margin : 0px; 
      padding : 0px;  
      text-align: center;
    	/*margin: 0;
    	padding: 0;
    	background-color: #353535;
    	text-align:center;
    	background-attachment: fixed;*/
    }	
    		
    #conteneur 
    {
    	margin: 0 auto 0;
    	position: relative;
    	width: 800px;
    	background:#fff;
    }  	 
    
    #header    
    {
    	height:134px; 
    	background:url(../../images_gabarit/ban.jpg) no-repeat top; 
    	margin: 0 auto 0 auto;
    } 	
    
    #left   
    {
    	float:left;
    	width: 190px;
    	margin:0 auto 0 25px;
    	text-align:center;
    	clear:both;
    }
      
    #right  
    {
    	width:596px;
    	margin:70px;
    	color:#9d9d9d;
    } 
    
    #pied  	
    {
    	height:40px;
    	/* background:url(../../images_gabarit/pied.jpg)*/ 
    	background-color:#ff6f00; 
    	margin: 0 auto 0 auto;
    	width:800px;
    	clear: both;
    }
    
    
     /*Pied*/
    .separateur	
    { 
    	clear: both;
    	visibility: hidden; 
    } 
    
    
    /*Menu horizontal*/
    #menu                  
    {
    	padding : 0;
    	margin : 0; 
    	list-style : none;
    	text-align : center;
    	font-family: verdana ; 
    	font-size: 15px;
    	width:800px;
    }
    
    #menu a               
     {
    	display : block;
    	height:40px;
    	color: #9d9d9d;
    	text-decoration : none;
    	line-height:40px;
    	width: 100px;
    	background: url(../../images_gabarit/bouton.jpg) no-repeat top ; 
    	outline:none; 
    	font:bold 12px/40px Verdana;
    }
    
    #menu li                
    {
    	float : left;
    }
    
    #menu a:hover     
    {
    	background: url(../../images_gabarit/bouton_hover.jpg);
    }	 			
    
    .navigation          
    { 
    	height:20px;
    	background:url(../../images_gabarit/menu.jpg) top;
    	width:150px;
    	color:#9d9d9d;
    	border-bottom:1px solid white;
    	padding:5px 0 5px 0;
    }
    
    div.vertical           
    {
    	float : left;
    	margin:10px auto 0 auto;
    	padding:0;
    	width:150px;
    	text-decoration: none;
    	list-style: none;
    	border-bottom:1px solid white;
    	text-align:center;
    }
    
    div.vertical a       
    {
    	background:#b6b3b3;
    	text-align:left;
    	width:140px;
    	height:30px;
    	display: block;
    	line-height:30px;
    	color: #fff;
    	font:bold 14px/30px "trebuchet ms";
    	text-decoration: none;
    	border-bottom:1px solid white;
    	padding:0 5px 0 5px;
    }
     
    div.vertical a:hover 
    {
    	color: #fff;
    	background:#fda910;
    }   
    
    div.vertical table{
    	background:#b6b3b3;
    	width:150px;
    }
    
    ul.vertical           
    {
    	margin:10px auto 0 auto;
    	padding:0;
    	width:150px;
    	text-decoration: none;
    	list-style: none;
    	border-bottom:1px solid white;
    	text-align:center;
    }
    
    ul.vertical li a       
    {
    	background:#b6b3b3;
    	text-align:left;
    	width:140px;
    	height:30px;
    	display: block;
    	line-height:30px;
    	color: #fff;
    	font:bold 14px/30px "trebuchet ms";
    	text-decoration: none;
    	border-bottom:1px solid white;
    	padding:0 5px 0 5px;
    }
     
    ul.vertical li a:hover 
    {
    	color: #fff;
    	background:#fda910;
    }   
     
    .copyright           
    {
    	float:right;
    	padding:0;
    	margin :8px 10px 0 0;
    	color:#585b5d;
    	font:bold 12px "trebuchet ms";
    }
       
    .copyright a        
    {
    	color:#585b5d;
    	font:bold 12px "trebuchet ms";
    	text-decoration: none;
    	outline:none;
    }
    
    .copyright a:hover  
    {
    	color:#9d9d9d;
    }
     
    img, p, h1, h2, h3, h4, h5, h6, Span, object, table, td, tr
    {
    	border:0;
    	margin:0;
    	padding:0;
    }
     
    Span		   
    {
    	color:#ff6f00;
    	text-decoration:none;
    	outline:none;
    	font:bold 14px "trebuchet ms";
    }
    
    a                   
    {
    	color:#ff6f00;
    	text-decoration:underline;
    	outline:none;
    	font:bold 12px "trebuchet ms";
    }
    	 
    a:hover             
    {
    	color:#585b5d;
    }
    Encore merci pour ton aide.
    Cordialement.

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

Discussions similaires

  1. Script qui ne s'execute pas comme voulu
    Par Kalork dans le forum Général JavaScript
    Réponses: 3
    Dernier message: 18/12/2013, 22h40
  2. [XL-2010] Créer une barre de menu façon "j'veux pas faire comme tout le monde"
    Par Alex'78 dans le forum Macros et VBA Excel
    Réponses: 0
    Dernier message: 23/07/2013, 17h43
  3. Réponses: 0
    Dernier message: 02/05/2012, 16h12
  4. jquery fonction load() ne marche pas comme voulu
    Par lemirandais dans le forum jQuery
    Réponses: 4
    Dernier message: 16/06/2009, 10h47
  5. Menu qui ne s'aligne pas sur le centre du site ?
    Par [ZiP] dans le forum Mise en page CSS
    Réponses: 4
    Dernier message: 10/01/2007, 09h51

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