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 :

Changement de position d'un menu vertical.


Sujet :

HTML

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2009
    Messages : 19
    Par défaut Changement de position d'un menu vertical.
    Bonjour,

    Alors voilà mon problème, je suis débutant en tant que codeur et je créer mon site internet tout en apprenant les codes.
    J'ai fait de mon mieux pour inséré une petit catégorie sur ma page web :

    http://www.casimages.com/img.php?i=0...6162593224.jpg

    Et donc j'aimerais faire en sorte que cette catégorie s'affiche horizontalement comme ça :

    http://www.casimages.com/img.php?i=0...6200182638.jpg

    Alors voici mon code css :

    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
    #menu1{
    float : left ;
    width : 151px ;
    }
     
     
    #menu1 h2{
    position : relative ;
    height : 33px ;
    margin : -6px 0 0 0 ; padding : 0 ;
    background : url(images/bgh2.jpg) ;
    }
     
     
     
    #menu1 h2 span{
    position : absolute ;
    top : -5000px ;
    }
     
     
     
    #menu1 ul{
    margin : 0 ;
    padding : 0;
    }
     
     
    #menu1 li{
    text-indent : 15px ;
    }
     
    #menu1 li a{
    display : block ;
    margin : 0 ;
    height : 33px ;
    line-height : 30px ;
    text-decoration : none ;
    color : #131313;
    text-transform : uppercase ;
    background : url(images/bgulcentreover.jpg);
    }
     
     
    #menu1 li a:hover{
    background : url(images/bgulcentre.jpg) ;
    }
     
     
    #menu1 #on{
    background : url(images/bgulcentre.jpg) ;
    }
    Merci d'avance,

  2. #2
    Rédacteur
    Avatar de Macmillenium
    Homme Profil pro
    Développeur front-end
    Inscrit en
    Mars 2008
    Messages
    2 333
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur front-end
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Mars 2008
    Messages : 2 333
    Par défaut
    Bonsoir,

    Essayes ceci :

    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
     
    #menu1 ul{
    margin : 0 ;
    padding : 0;
    overflow:hidden;
    }
     
     
    #menu1 li{
    /* text-indent : 15px ; */
    display:inline;
    }
     
    #menu1 li a{
    /* display : block ; */
    float:left;
    text-indent : 15px ;
    /* margin : 0 ; */ /* Si tu ne déclare pas d'autres styles ailleurs */
    height : 33px ;
    line-height : 30px ;
    text-decoration : none ;
    color : #131313;
    text-transform : uppercase ;
    background : url(images/bgulcentreover.jpg);
    }

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2009
    Messages : 19
    Par défaut
    Merci pour ton aide, alors j'ai essayer et donc ça donne à peux près la même chose : voilà mon site en ligne : http://skateandfriends.e3b.org/animes.htm

    Puis voilà ce que donne ma page htm :

    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
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!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>Japan-Monde / Mangas</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta http-equiv="Content-Language" content="fr" />
    <meta name="Description" content="Zwatla : kit graphique gratuit" />
    <meta name="Keywords" content="kit graphique, kit graphique gratuit, kit graphique stratigraphics" />
    <link rel="stylesheet" type="text/css" href="sgfx.css" />
    </head>
     
    <body>
    <div id="site"> 
      <div id="header"> 
        <div class="img_haut"></div>
      </div>
      <div id="menu"> 
        <ul>
          <li><strong><a href="index.htm">Page d'accueil</a></strong></li>
          <li><a href="#"><strong>Japan-monde</strong></a></li>
          <li><a href="#"><strong>Le forum</strong></a></li>
          <li><strong><a href="#">Partenaires</a></strong></li>
          <li><a href="#"><strong>Contact</strong></a></li>
          <li><a href="nousrejoindre.htm"><strong>Nous rejoindre</strong></a></li><b></b>
        </ul>
      </div>
      <div id="centre"> 
        <div id="bloc_centre"> 
          <div class="corect_bug_galery"> 
            <dl class="gallery">
              <dt><a href="index.htm"><img src="images_site/av_001.jpg" alt="Web design" /></a></dt>
              <dd>Accueil</dd>
            </dl>
            <dl class="gallery">
              <dt><a href="http://www.zwatla.com/kits_graphiques.html"><img src="images_site/av_002.jpg" alt="Kits graphiques" /></a></dt>
              <dd>Les animes</dd>
            </dl>
            <dl class="gallery">
              <dt><a href="http://blog.zwatla.com/"><img src="images_site/av_003.jpg" alt="Blogs gratuits" width="306" height="124" /></a></dt>
              <dd>Les scans</dd>
            </dl>
            <dl class="gallery">
              <dt><a href="http://www.zwatla.com/emoticones.html"><img src="images_site/av_004.jpg" alt="émoticones" width="151" height="124" /></a></dt>
              <dd>Autres</dd>
            </dl>
          </div>
          <div id="menu1">
     
    <ul>
    <li><a href="#" id="on">News</a></li>
    <li><a href="#">Ordre alphabétique</a></li>
    <li ><a href="#">Classement</a></li>
    <li><a href="#">Concours</a></li>
    </ul>
    </div>
          <h1>Bienvenue</h1>
          <p>Bienvenue sur Mangas-PlayerList, si vous souhaitez découvrir de nouveaux 
            animés mangas alors vous ètes au bon endroit. Ce nouveau site internet 
            est dédié aux épisodes de vos séries préférés. Elles sont disponnibles 
            en version originale sous-titré pour les plus grands fans et en version 
            française. Donc le site internet est régulièrement mis à jour par l'équipe. 
            Les vidéos des épisodes sont tous importés de Wat.tv.<a href="http://www.sgfx.info" class="class3"></a></p>
          <h1>Nouveaux épisodes</h1>
    <p>Bleach 213 [VOSTFR] :</p><br/>
     
    <div><object width="470" height="312"><param name="movie" value="http://www.wat.tv/swf2/307647NpYyDU92404699" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.wat.tv/swf2/224047skTzZNP2404699" type="application/x-shockwave-flash" width="470" height="312" allowScriptAccess="always" allowFullScreen="true" ></embed></object></div><div class="watlinks" style="width:470px;font-size:11px; background:#CCCCCC; padding:2px 0 4px 0"><a target="_blank" class="waturl" href="http://www.wat.tv/video/bleach-215-vostfr-1fjh7_o1go_.html"><strong>Bleach 215 vostfr</strong></a> sélectionné dans <a href="http://www.wat.tv/guide/animation-anime" class="waturl alttheme" title="Animation">Animation</a> et <a href="http://www.wat.tv/guide/animation-3d-film-cinema" class="waturl altrubrique" title="Film d'animation">Film d'animation</a> </div>
          <h1>Kit graphique gratuit</h1>
          <p>Ce kit graphique est livré avec tous les fichiers nécessaires à sa modification. 
            Il est donc entièrement personnalisable.</p>
          <p>Chacun de nos kits graphiques a été conçu pour faciliter au maximum la 
            mise en place de votre texte et vos photos, et ce en limitant le plus 
            possible les compétences et logiciels requis.</p>
          <p>Quelques notions de base concernant les feuilles de style (css) sont 
            indispensables pour réaliser votre site perso.</p>
          <p>Si vous désirez un site internet personnalisé sur cette base mais avec 
            d'autres mots, couleurs, etc. : <a href="http://www.zwatla.com/contact.php">contactez-nous</a>.</p>
          <p>Vous utilisez ces kits graphiques et voulez nous montrer ce que vous 
            en avez fait ? Besoin d'aide pour monter un kit graphique ? Merci de passer 
            par le Forum. </p>
          <p>Attention : pensez à lire les <a href="http://www.zwatla.com/forum/viewtopic.php?id=117">conditions 
            d'utilisation</a> des kits graphiques avant de les télécharger, merci.</p>
        </div>
      </div>
      <div id="footer"> 
        <p>Japan-Monde&copy; </p>
      </div>
    </div>
     
    </body>
    </html>
    Puis voilà ma page CSS :

    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
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    body {
    margin : 0 ; 
    padding : 0 ; 
    text-align : center;
     background : #4c4c4c url(images_site/bg_all.gif) repeat-x;
     font-family : arial; 
     font-size : 11px; 
     color : #373737}
     
     
     
     /*  SITE
    ********************************************************************/
     
    #site {
    position : relative; 
    width : 857px; 
     background : transparent;
     margin-left : auto;
     margin-right : auto;
     text-align : center; 
    }
     
     
    .content_img {
    background-color: #fff;
    width: 141px ;
    text-align: left;
    padding: 10px 10px  0 12px ;
    float: left;
    }
     
     
     
     
    .content_img p{
    margin : 0; padding : 0
    }
     
     
     
    #site p {  padding : 0 20px ; }
     
     
     
     /*  HEADER
    ********************************************************************/
     
     
     
    #header {
    border-top : 1px solid #4c4c4c;
    width : 100%; 
    height : 303px ; 
    background : url(images_site/haut.gif) no-repeat;
     margin-left : auto;
     margin-right : auto;
     text-align : left; 
     }
     
     
     
     
     
     
     
    .img_haut {
     background : url(images_site/expo.jpg) no-repeat;
     width : 558px;
     height : 206px;
    margin : 80px 0 0 200px
    }
     
     
     
     
     
     /*  CENTRE
    ********************************************************************/
     
     
     
    #centre {
    width : 100%; 
    background : url(images_site/centre.gif);
     margin-left : auto; 
     margin-right : auto;
     padding-bottom : 0;
     text-align : left }
     
     
     
    /*  FOOTER
    ********************************************************************/
     
     
    #footer {
    width : 100%; 
    height : 151px ; 
    background : transparent url(images_site/bas.gif);
     margin-left : auto;
     margin-right : auto }
     
     
    #footer p {
    position : absolute ;  
    margin :  0; 
    padding : 0;
    bottom : 75px;
    right : 120px ; 
    font-size : 80%;
    color : #000; 
    }
     
     
    #footer a {
    color : #000; 
    }
     
    #footer a:hover {
    text-decoration : underline ; 
    }
     
     
    /*  MENU
    ********************************************************************/
     
     
     #menu {
     position : absolute ; 
    left : 0px ; 
     top : 26px ;
    text-align : left;
    background : url(images_site/menuhaut.gif) top left no-repeat;
    }
     
     
    #menu ul{ 
     width : 202px ; 
     height : 275px; 
    list-style: none; 
    margin : 5px 0 0 0;
    padding : 25px 0 0 29px;
    text-transform : uppercase; 
    }
     
     #menu li{
    margin :0 ;
    padding : 0 ;
    list-style: none; 
    line-height : 30px;
    text-align : left;
    text-indent : 5px  }
     
     #menu li a {
     background : transparent url(images_site/bg_menu.gif) bottom no-repeat; 
    width: 150px;
    display: block;
    height : 30px;
    text-decoration: none;
    margin :  0;
    padding : 0;
    list-style: none;
    color  : #232323 }
     
     
    #menu li a:hover {
     background : transparent url(images_site/bg_menu_ov.gif) bottom no-repeat; 
     height : 30px;
    }
     
     
    /*  MENU 1
    ********************************************************************/
     
     
    #menu1{
    float : left  ; 
    width : 165px ; 
    }
     
     
    #menu1  h2{
    position : relative ;
    height : 33px ;
    margin : -6px 0 0 0 ; padding : 0 ;  
    background : url(images_site/bgh2.jpg) ;
    }
     
     
    #menu1  h2 span{
    position : absolute ; 
    top : -5000px ;
    }
     
     
     
    #menu1 ul{
    margin : 0 ;
    padding : 0;
    overflow:hidden;
    }
     
     
    #menu1 li{
    /* text-indent : 15px ; */
    display:inline;
    }
     
    #menu1 li a{
    /* display : block ; */
    float:left;
    text-indent : 15px ;
    /* margin : 0 ; */ /* Si tu ne déclare pas d'autres styles ailleurs */
    height : 33px ;
    line-height : 30px ;
    text-decoration : none ;
    color : #131313;
    text-transform : uppercase ;
    background : url(images_site/bgulcentreover.jpg);
    }
     
     
     
    #menu1 li a:hover{
    background : url(images_site/bgulcentre.jpg) ; 
    }
     
     
    #menu1 #on{
    background : url(images_site/bgulcentre.jpg) ; 
    }
     
      /*  GALERIE
    ********************************************************************/
     
    .corect_bug_galery { 
    width: 100%;
    height: 145px;
     background : #4c4c4c url(images_site/bgbugmenu.jpg)}
     
    dl.gallery
    {
     
    background : #4c4c4c;
    width: 167px;
    text-align: center;
    float: left;
    margin : 0;
    padding : 0;
    color : #fff;
    }
     
    .gallery dt { }
     
    .gallery dt img
    {
     
    width: 167px;
    height: 124px;
    border : none; 
     
    }
     
     
    .gallery dd
    {
     font-weight: bold; 
     text-transform : uppercase; 
    margin: 0;
    padding: 0 0 4px 0;
    background : #4c4c4c;
    color : #fff
    }
     
    .gallery dd a
    {
    color : #fff
    }
     
     
      /*  PUB
    ********************************************************************/
     
     
    #pub{
    position : absolute; 
    bottom : 36px  !important;
    bottom : 35px ;
    right : 2px  !important;
    right : 1px;
    width : 224px; 
    height : 403px; 
     background : transparent url(images_site/menubrun.gif) top left no-repeat;
    color : #fff; 
    text-align : left; 
     
     }
     
    .text_pub { 
     overflow : auto;
     width : 174px; 
    height : 360px; 
    margin : 15px 0 0 25px;
    padding : 0;
    background : transparent;  }
     
    .text_pub p{ 
    padding :10px  10px 0  10px;
      }
     
     
     
      /*  BLOC CENTRE
    ********************************************************************/
     
     
     
    #bloc_centre{ 
    width : 670px; 
     padding-bottom : 30px; 
    background : #fff;
     margin-left : 88px !important;
     margin-left : 88px ;
    text-align : left;}
     
     
     
     
     
     
     
     
     
     h1 {
     margin : 0 0 0 20px ; 
     padding : 20px 0 0 0 ; 
     font-family : times ;  
     font-size : 32px ; 
     clear : left 
     }
     
     
    div.pousse {margin-left : 5px}
     
    .float_left {float : left}
     
    .spacer {clear : both ; height : 13px}
     
    .apropos {width : 85% ; padding : 5px 0 0 0 ; margin : 0 25px 0 20px ; }
     
    a {color : #ffa500 ; text-decoration : none}
    a:hover {color : #000 ; text-decoration : none}
     
     
     
     
     
     
     
     
     
     
    .ref {float : left}
    .tarifs  {float : right  ; margin: 0; padding : 0}
    .name {font-weight : bold ; clear : both}
     
     
     
    .pubdownload {
    margin : 20px 0 0 20px;
     
     
    }
     
    .pubdownload img{
    float : left ; margin-right : 10px
     
    }
     
    .raisons {
    float : left ; width : 250px ;  height : 40px
     
    }
     
      h2 {margin : 0  ; padding :  0 ; font-size : 16px ; clear : left ; color : #373737 }
    Il y à t'il quelque chose que j'ai mal fait ?

    PS : même en enlevant les balises <li></li> des menus la problème est le même

  4. #4
    Rédacteur
    Avatar de Macmillenium
    Homme Profil pro
    Développeur front-end
    Inscrit en
    Mars 2008
    Messages
    2 333
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur front-end
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Mars 2008
    Messages : 2 333
    Par défaut
    Citation Envoyé par Powerdark94 Voir le message
    Il y à t'il quelque chose que j'ai mal fait ?
    Oui,
    Enlèves le width:165px; que tu as sur le conteneur #menu1 et le float:left; si t'en plus besoin.

  5. #5
    Membre averti
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2009
    Messages : 19
    Par défaut
    Voilà ça ressemble plus à ce que j'attendais merci mais juste une dernière chose... http://skateandfriends.e3b.org/animes.htm

    Possible de définir la taille des rectangles gris ? Car apparemment les rectangles grandissent suivant si le mot est plus ou moins long.

  6. #6
    Rédacteur
    Avatar de Macmillenium
    Homme Profil pro
    Développeur front-end
    Inscrit en
    Mars 2008
    Messages
    2 333
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur front-end
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Mars 2008
    Messages : 2 333
    Par défaut
    En ajoutant un width:167px (à toi d'adapter) sur #menu1 li a

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

Discussions similaires

  1. Probleme position menu vertical
    Par asco5 dans le forum Débuter avec Java
    Réponses: 3
    Dernier message: 06/08/2008, 09h22
  2. Position Fix mais seulement vertical en FIREFOX
    Par grimsk dans le forum Balisage (X)HTML et validation W3C
    Réponses: 5
    Dernier message: 19/05/2006, 21h08
  3. Menu vertical fixe
    Par batmat86 dans le forum Général JavaScript
    Réponses: 15
    Dernier message: 10/01/2006, 02h54
  4. Menu vertical différent sous FF et IE
    Par Myogtha dans le forum Balisage (X)HTML et validation W3C
    Réponses: 1
    Dernier message: 06/12/2005, 00h29

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