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

HTML Discussion :

Position d'un menu


Sujet :

HTML

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre très actif
    Homme Profil pro
    Inscrit en
    Septembre 2012
    Messages
    164
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2012
    Messages : 164
    Par défaut Position d'un menu
    Bonjour,

    j'ai un site web que je souhaite créer pour un projet et j'ai un petit problème au niveau du menu, il se place sur le coté gauche alors qu'il doit se mettre en dessous d'accueil je parle des onglets connexions et inscriptions, et je voulais savoir est ce qu'il est possible de faire un effet javascript en css, c'est a dire afficher le sous menu au clic?
    Nom : 558037site.jpg
Affichages : 88
Taille : 128,5 Ko
    html
    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
    <!DOCTYPE html>
    <html>
        <head>
        <title>CDISCOUNT</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" href="Custom.css" /> 
        </head>
    <body>
        <div class="container">
            <div class="volet_connexion">
                <div class="espace_client">
                    Espace Client
                </div>
                <form action="login.php" method="post">  <!-- formulaire  de connexion -->
                <label for="login">Login</label>
                <input type="text" name="login" value=""/>         
                <label for="pass">Password</label>
                <input type="password" name="password" value="" />
                <input type="submit" name="connexion" value="Se connecter"/>
                </form>
            </div> 
            <div class="authentification">Vous êtes connecté en tant que ...</div>
            <div class="header">Entête   </div>
           <div class="volet_gauche">
               <div class="container_volet_gauche">
                   Qui sommes-nous?
               </div>
               <div class="administration">
                   Administration
               </div>
            </div>
             <div id="menu_déroulant">
                 <ul>
                 <li><a href="#">Accueil</a></li>
                 <li><a href="#">Informatique</a>
                     <ul>
                        <li>  <a href="#">Connexion</a></li>
                        <li><a href="#">Inscription</a></li>
                    </ul>
                 </li>
                 <li><a href="#">Hi-Fi</a></li>
                 <li><a href="#">Musique</a></li>
                 <li><a href="#">Cuisine</a></li>
                 <li><a href="#">Electroménager</a></li>
                 <li><a href="#">Hacking</a></li>  
                 </ul>   
                </div>
             <div class="photo">Photo</div>
            <div class="article">Article</div>
         </div>                 	
            <?php
            
            ?>
    </body>
    </html>
    Le CSS

    Code css : 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
    body{
        width: 98.7%;
        height: 650px;
        background-color: #999999;  
    }
    ul{
        margin: 0;
        padding: 0;
    }
    .container{
        width: 100%;
        height: 650px;
        background-color: #006666; 
    }
    .volet_connexion{
        width: 15%;
        height: 170px;
        background-color: #3333ff;
        float:left;
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
    .volet_connexion input[type=submit]{
        background-color: #3300cc;
        border: 1px solid #111;
        border-radius: 20px;
        text-align: center;
        font-family: arial;
        font-size: 18px;
        padding: 0 ;
        margin-top: 8px;
        outline:none;    
    }
    .volet_connexion input[type=text], .volet_connexion input[type=password]{ 
        background-color: #3300cc;
        border: 1px solid #111;
        border-radius: 15px;
        text-align: center;
        font-family: arial;
        font-size: 18px;
        outline:none;
        width: 85%;
    }
     
    .espace_client{
        width: 100%;
        height: 30px;
        background-color: #006666;
        float:left;
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
    .volet_gauche{
        width: 15%;
        height: 480px;
        background-color: #0066ff;
        float:left; 
    }
     
    .container_volet_gauche{
        width: 100%;
        height: 420px;
        background-color: #003333;  
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
     
    .administration{
        width: 100%;
        height: 60px;
        background-color:  #9900ff;
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
     
    .header{
        width: 70%;
        height: 170px;
        background-color: #6666ff;
        margin: 0 auto;
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
     
    #menu_déroulant {
         width: 100%;
         height:25px;   
         background-color: #990099;
         text-align: center;
         font-family: arial;
         font-size: 18px;
    }
     
    #menu_déroulant ul li ul{
        position:absolute;
        top: 0 ;
        left: 0;
    }
    #menu_déroulant ul li  {
        list-style : none;
        margin-bottom: 1px;
        position: relative;
    }
     
    #menu_déroulant  ul li  a{
        display: block;
        background:#000;
        color: #ffffff;
        width: 147.2px;
        height: 25px;
        text-align: center;
        float: left;
        font-family: arial;
        font-size: 18px; 
        text-decoration: none;
        -webkit-animation: all 0.7s;
        -moz-transition:  all 0.7s;
        -o-transition: all 0.7s;
        transition: all 0.7s;
    }
     
    #menu_déroulant  ul li  a:hover{
        background:#66ff66;
        color: #fff;
    }
     
    .photo{
        width: 33%;
        height: 410px;
        background-color: #3300cc;
        float: left;
        margin-left: 10px;
        margin-top: 35px;
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
    .article{
        width: 49.5%;
        height: 410px;
        background-color: #3300cc;
        float: right;
        margin-right: 10px;
        margin-top: 35px;
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
    .authentification{
        width: 15%;
        height:170px;
        background-color: #3333ff;
        float: right; 
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }

  2. #2
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 209
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 209
    Par défaut
    Bonjour,
    pas vraiment compris le résultat attendu mais il semblerait que la structure même du document soit à revoir.

  3. #3
    Membre très actif
    Homme Profil pro
    Inscrit en
    Septembre 2012
    Messages
    164
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2012
    Messages : 164
    Par défaut
    as-tu regardé l'image? dans le menu, j'ai le sous-menu connexion et inscription qui s'affiche à gauche or ils devrait être en dessous d'accueil, c'est plus claire comme ça , c'est le problème que j'essaie de resoudre.

  4. #4
    Membre très actif

    Homme Profil pro
    Inscrit en
    Octobre 2011
    Messages
    354
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations forums :
    Inscription : Octobre 2011
    Messages : 354
    Par défaut
    commence par enlever le positionnement absolute
    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    #menu_déroulant ul li ul{
        position:absolute;
        top: 0 ;
        left: 0;
    }

  5. #5
    Membre très actif
    Homme Profil pro
    Inscrit en
    Septembre 2012
    Messages
    164
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2012
    Messages : 164
    Par défaut Positionnement du menu
    j'ai fini par resoudre partiellement le problème mais maintenant j'ai un espace entre mon menu et sous-menu.

    Nom : 454098Problmemenu.jpg
Affichages : 81
Taille : 112,1 Ko

    html
    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
    <!DOCTYPE html>
    <html>
        <head>
        <title>CDISCOUNT</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" href="Custom.css" /> 
     
        </head>
    <body>
        <div class="container">
            <div class="volet_connexion">
                <div class="espace_client">
                    Espace Client
                </div>
                <form action="login.php" method="post">  <!-- formulaire  de connexion -->
                <label for="login">Login</label>
                <input type="text" name="login" value=""/>         
                <label for="pass">Password</label>
                <input type="password" name="password" value="" />
                <input type="submit" name="connexion" value="Se connecter"/>
     
                </form>
     
     
            </div> 
     
            <div class="authentification">
     
                    Vous êtes connecté en tant que ...
     
            </div>
     
            <div class="header">
                Entête         
            </div>
     
           <div class="volet_gauche">
               <div class="container_volet_gauche">
                   Qui sommes-nous?
               </div>
     
               <div class="administration">
                   Administration
               </div>
            </div>
            <div id="menu_déroulant">
    <ul>
       <li>
       <a href='#'>Accueil</a>
        <ul>
     
    		<li><a href='#'>Espace Client</a></li>
    		<li><a href='#'>Boutique</a></li>
     
    	</ul>
    	</li>   
     
    </ul> 
    <ul>
       <li>
       <a href='#'>Informatique</a>
        <ul>
     
    		<li><a href='#'>Pièces détachées</a></li>
    		<li><a href='#'>Dépannage</a></li>
     
    	</ul>
    	</li>   
     
    </ul> 
    <ul>
       <li>
       <a href='#'>Hi-fi</a>
        <ul>
     
    		<li><a href='#'>Casque</a></li>
    		<li><a href='#'>Sono</a></li>
     
    	</ul>
    	</li>   
     
    </ul> 
     
    <ul>
       <li>
       <a href='#'>Electroménager</a>
        <ul>
     
    		<li><a href='#'>Micro-ondes</a></li>
    		<li><a href='#'>Machine à laver</a></li>
     
    	</ul>
    	</li>   
     
    </ul> 
    <ul>
       <li>
       <a href='#'>Hacking</a>
        <ul>
     
    		<li><a href='#'>Phishing</a></li>
    		<li><a href='#'>Carding</a></li>
     
    	</ul>
    	</li>   
     
    </ul> 
    <ul>
       <li>
       <a href='#'>DVD</a>
        <ul>
     
    		<li><a href='#'>Blue-Ray</a></li>
    		<li><a href='#'>DVD Video</a></li>
     
    	</ul>
    	</li>   
     
    </ul> 
    <ul>
       <li>
       <a href='#'>Logiciel</a>
        <ul>
     
    		<li><a href='#'>Utilitaire</a></li>
    		<li><a href='#'>Antivirus</a></li>
     
    	</ul>
    	</li>   
     
    </ul> 
    <ul>
       <li>
       <a href='#'>Jeux</a>
        <ul>
     
    		<li><a href='#'>Console</a></li>
    		<li><a href='#'>Société</a></li>
     
    	</ul>
    	</li>   
     
    </ul> 
      <div class="photo">
                Photo
            </div>
            <div class="article">
                Article
            </div>
    </div>
     
     
                </div>
     
         </div>                 	
            <?php
            
            ?>
    </body>
    </html>
    le css
    Code css : 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
    body
    {
        width: 98.7%;
        height: 650px;
        background-color: #999999;  
    }
     
    .container
    {
        width: 100%;
        height: 650px;
        background-color: #006666; 
     
    }
    .volet_connexion
    {
        width: 15%;
        height: 170px;
        background-color: #3333ff;
        float:left;
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
    .volet_connexion input[type=submit]
    {
        background-color: #3300cc;
        border: 1px solid #111;
        border-radius: 20px;
        text-align: center;
        font-family: arial;
        font-size: 18px;
        padding: 0 ;
        margin-top: 8px;
        outline:none;
     
     
     
    }
    .volet_connexion input[type=text], .volet_connexion input[type=password]
    { 
        background-color: #3300cc;
        border: 1px solid #111;
        border-radius: 15px;
        text-align: center;
        font-family: arial;
        font-size: 18px;
        outline:none;
        width: 85%;
    }
     
    .espace_client
    {
        width: 100%;
        height: 30px;
        background-color: #006666;
        float:left;
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
    .volet_gauche
    {
        width: 15%;
        height: 480px;
        background-color: #0066ff;
        float:left;   
     
    }
     
    .container_volet_gauche
    {
        width: 100%;
        height: 420px;
        background-color: #003333;  
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
     
    .administration
    {
        width: 100%;
        height: 60px;
        background-color:  #9900ff;
        text-align: center;
        font-family: arial;
        font-size: 18px;
     
    }
     
    .header
    {
        width: 70%;
        height: 170px;
        background-color: #6666ff;
        margin: 0 auto;
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }
     
    #menu_déroulant ul 
    {
    	margin: 0;     		/* pas de marge intérieur */
    	padding: 0;			/* Pas de marge extérieur */  
    	line-height:30px;
     
    }
     
    #menu_déroulant li  
    {
    	list-style:none;   /* on enlève les macros */
    	float:left;		   /* flottant gauche */
    	position:relative;
    	background-color:#999;
    }
    #menu_déroulant ul li a
    {
    color:#00FFFF;                 /*Couleur des liens */
    text-decoration: none;      /*on enlève le soulignement */
    width: 126.91px;
    height: 25px;
    display: block;
    text-align:center;
    border: 1px solid #000000;
    -webkit-transition: all 100ms linear;
    -moz-transition: all 100ms linear;
    -o-transition: all 100ms linear;
    -ms-transition: all 100ms linear;
    transition: all 100ms linear;
    font-family: arial;
    font-size: 16px;
     
    }
    #menu_déroulant ul ul
    {
    position:absolute;
    top:31px;
    visibility: hidden;
     
     
    }
    #menu_déroulant ul li:hover ul
    {
    visibility: visible;
     
    }
    #menu_déroulant li:hover
    {
    background-color:#000000;
     
    }
     
     
     
    .photo
    {
        width: 33%;
        height: 405px;
        background-color: #3300cc;
        float: left;
        margin-left: 10px;
        margin-top: 40px;
        text-align: center;
        font-family: arial;
        font-size: 18px;
     
     
    }
    .article
    {
        width: 49.5%;
        height: 405px;
        background-color: #3300cc;
        float: right;
        margin-right: 10px;
        margin-top: 40px;
        text-align: center;
        font-family: arial;
        font-size: 18px;
     
     
     
     
    }
    .authentification
    {
        width: 15%;
        height:170px;
        background-color: #3333ff;
        float: right; 
        text-align: center;
        font-family: arial;
        font-size: 18px;
    }

  6. #6
    Membre très actif
    Homme Profil pro
    Inscrit en
    Septembre 2012
    Messages
    164
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2012
    Messages : 164
    Par défaut
    je viens de résoudre mon problème c'était un problème de top.

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

Discussions similaires

  1. [WD12] Position d'un menu contextuel ouvert
    Par Kestumate dans le forum WinDev
    Réponses: 5
    Dernier message: 30/04/2010, 13h21
  2. Changement de position d'un menu vertical.
    Par Powerdark94 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 8
    Dernier message: 19/04/2009, 22h23
  3. Position image avant menu
    Par Skeud007 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 1
    Dernier message: 21/02/2008, 17h25
  4. position d'un menu
    Par tenderstoune dans le forum Mise en page CSS
    Réponses: 5
    Dernier message: 23/06/2007, 00h50
  5. position d'un menu.js dans un JSP
    Par Smix007 dans le forum Servlets/JSP
    Réponses: 3
    Dernier message: 07/02/2007, 14h33

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