[Résolu] Changer menu: du sous menu horizontal à vertical

Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
#1
Citation :#~~~~~ DEBUT BLOC A NE PAS SUPPRIMER ~~~~~
#~ Version du CMS: #1.6.10
#~ Url du site :
#~ Hébergeur / Soft :
#~ Informations Système :
#~~~~~ FIN BLOC A NE PAS SUPPRIMER ~~~~~



Bonjour à tous,

Je dois changer le menu de notre site 3w.als-formationlangues.com/index.php?page=home&hl=fr
Comme vous pouvez le voir, le menu est horizontal et le sous menu également mais ce n'est pas très ergonome. Alors on voudrait que le sous menu soit vertical.

J'ai déjà lu pas mal et même posté sur le forum OVH mais je n'arrive pas à trouver comment faire.
Est-ce que quelqu'un saurait me guider ou m'aider avec ce souci?
J'ai essayé de changer le gabarit est celui qui me plaît c'est celui du Nbleu

Merci et à bientôt

Je peux vous donner le site par mail ou mp
#1
Citation :#~~~~~ DEBUT BLOC A NE PAS SUPPRIMER ~~~~~
#~ Version du CMS: #1.6.10
#~ Url du site :
#~ Hébergeur / Soft :
#~ Informations Système :
#~~~~~ FIN BLOC A NE PAS SUPPRIMER ~~~~~



Bonjour à tous,

Je dois changer le menu de notre site 3w.als-formationlangues.com/index.php?page=home&hl=fr
Comme vous pouvez le voir, le menu est horizontal et le sous menu également mais ce n'est pas très ergonome. Alors on voudrait que le sous menu soit vertical.

J'ai déjà lu pas mal et même posté sur le forum OVH mais je n'arrive pas à trouver comment faire.
Est-ce que quelqu'un saurait me guider ou m'aider avec ce souci?
J'ai essayé de changer le gabarit est celui qui me plaît c'est celui du Nbleu

Merci et à bientôt

Je peux vous donner le site par mail ou mp
#2
salut veritofr

tu pourrais pas passer sous 1.11 .x ta version là ? je sais qu'on est sencé faire du support sur la 1.6 mais ça commence à dater un peu non ?

Concernant ton soucis, c'est une question de pure CSS et pas une question liée à cmsmadesimple que tu poses. Te donner une solution "comme ça" est impossible. Installe toi une version de cmsmadesimple sur ton PC et navigue dans les exemples. tu y trouveras des menus verticaux à ta disposition à partir desquels tu pourras t'inspirer.
#2
salut veritofr

tu pourrais pas passer sous 1.11 .x ta version là ? je sais qu'on est sencé faire du support sur la 1.6 mais ça commence à dater un peu non ?

Concernant ton soucis, c'est une question de pure CSS et pas une question liée à cmsmadesimple que tu poses. Te donner une solution "comme ça" est impossible. Installe toi une version de cmsmadesimple sur ton PC et navigue dans les exemples. tu y trouveras des menus verticaux à ta disposition à partir desquels tu pourras t'inspirer.
#3
Bonjour Bess
Merci d'avoir pris le temps de me répondre

En effet le problème c'est le css et je ne suis pas très douée...
Alors je vais essayer de suivre ton exemple, et installer le cms sur mon pc

Changer la version peut modifier trop l'affichage de mon site?

est-ce que tu saurais me dire quel gabarit il faut changer exactement par exemple?
#3
Bonjour Bess
Merci d'avoir pris le temps de me répondre

En effet le problème c'est le css et je ne suis pas très douée...
Alors je vais essayer de suivre ton exemple, et installer le cms sur mon pc

Changer la version peut modifier trop l'affichage de mon site?

est-ce que tu saurais me dire quel gabarit il faut changer exactement par exemple?
#4
changer la version depuis une version si ancienne ne va pas être une partie de plaisir (c'est comme passer de windows 95 à windows 8 d'un coup si tu veux... )

donc ne le fait pas en ligne mais avec une copie de sauvegarde sur ton pc. Lis le wiki, il est plein de documentation concernant l'upgrade et les erreurs que TU VAS rencontrer

pour le gabarit à changer : rien n'est à changer de suite. Commence par te mettre à jour et à installer en // une version de zéro afin de regarder les exemples fournit. Tu te prendra pour un maçon du CSS d'içi quelques jours le temps de te former Wink
#4
changer la version depuis une version si ancienne ne va pas être une partie de plaisir (c'est comme passer de windows 95 à windows 8 d'un coup si tu veux... )

donc ne le fait pas en ligne mais avec une copie de sauvegarde sur ton pc. Lis le wiki, il est plein de documentation concernant l'upgrade et les erreurs que TU VAS rencontrer

pour le gabarit à changer : rien n'est à changer de suite. Commence par te mettre à jour et à installer en // une version de zéro afin de regarder les exemples fournit. Tu te prendra pour un maçon du CSS d'içi quelques jours le temps de te former Wink
#5
Bonjour Bess,

Bon j'ai pas mal lu et pas mal travaillé, est-ce que tu veux bien regarder ce que ça donne mon menu?

le site est als formation langues le test est dans l'option test du menu



Je n'arrive pas à comprendre pourquoi les sous menus restent à gauche?

voici ma feuille de style:

Code :
[== CSS ==]
#menu_vert {
/* no margin/padding so it fills the whole div */
    margin: 0;
    padding: 0;
}
.clearb {
/* needed for some browsers */
    clear: both;
}
#menuwrapper {
/* set the background color for the menu here */
    background-color: #e45897;
/* IE6 Hack */
    height: 1%;
    width: auto;
/* one border at the top */
/* mettre une ligne au dessus de la bannière principale en haut */
    border-top: 1px solid #3F565C;
    margin: 0;
    padding: 0;
}
ul#primary-nav, ul#primary-nav ul {
/* remove any default bullets */
    list-style-type: none;
    margin: 0;
    padding: 0;
}
ul#primary-nav {
/* pushes the menu div up to give room above for background color to show */
    padding-top: 1px;
/* keeps the first menu item off the left side */
    padding-left: 10px;
}
ul#primary-nav ul {
/* make the ul stay in place so when we hover it lets the drops go over the content below else it will push everything below out of the way */
    position: absolute;
/* top being the bottom of the li it comes out of */
    top: auto;
/* keeps it hidden till hover event */
    display: none;
/* same size but different color for each border */
/* ici on met la largeur des cadres dans le sousmenu */
    border-top: 1px solid #C8D3D7;
    border-right: 1px solid #C8D3D7;
    border-bottom: 1px solid #ADC0C7;
    border-left: 1px solid #A5B9C0;
}
ul#primary-nav ul ul {
/* now we move the next level ul down from the top a little for distinction */
    margin-top: 1px;
/* pull it in on the left, helps us not lose the hover effect when going to next level */
    margin-left: -1px;
/* keeps the left side of this ul on the right side of the one it came out of */
    left: 100%;
/* sets the top of it inline with the li it came out of */
    top: 0px;
}
ul#primary-nav li {
/* floating left will set menu items to line up left to right else they will stack top to bottom */
*/ j'ai mis right pour que les colonnes qui rentrent pas en haut soit à droite*/
    float: right;
/* no margin/padding keeps them next to each other, the padding will be in the "a" */
/* c'est la marge entre chaque cadre du menu*/
    margin: 0px;
    padding: 0px;
}
#primary-nav li li {
/* Set the width of the menu elements at second level. Leaving first level flexible. */
    width: 200px;
/* removes any left margin it may have picked up from the first li */
    margin-left: 1px;
/* keeps them tight to the one above, no missed hovers */
    margin-top: -1px;
/* removes the left float set in first li so these will stack from top down */
    float: none;
/* relative to the ul they are in */
    position: relative;
}
/* set the "a" link look here */
ul#primary-nav li a {
/* specific font size, this could be larger or smaller than default font size */
    font-size: 1em;
/* make sure we keep the font normal */
    font-weight: normal;
/* set default link colors */
    color: #fff;
/* pushes out from the text, sort of like making links a certain size, if you give them a set width and/or height you may limit you ability to have as much text as you need */
    padding: 12px 15px 15px;
    display: block;
/* sets no underline on links */
    text-decoration: none;
}
ul#primary-nav li a:hover {
/* kind of obvious */
    background-color: transparent;
}
ul#primary-nav li li a:hover {
/* this is set to #000, black, below so hover will be white text */
    color: #FFF;
}
ul#primary-nav li a.menuactive {
    color: #000;
/* bold to set it off from non active */
    font-weight: bold;
/* set your image here */
    background:  url(uploads/ngrey/nav.png) repeat-x left 0px;
}
ul#primary-nav li a.menuactive:hover {
    color: #000;
/* keep it the same */
    font-weight: bold;
}
#primary-nav li li a.menuparent span {
/* makes it hold a shape */
    display: block;
/* set your image here, right arrow, 98% over from the left, 100% or 'right' puts it to far */
    background:  url(uploads/ngrey/parent.png) no-repeat 98% center;
}
/* gif for IE6, as it can't handle transparent png */
* html #primary-nav li li a.menuparent span {
/* set your image here, right arrow, 98% over from the left, 100% or 'right' puts it to far */
    background:  url(uploads/ngrey/parent.gif) no-repeat 98% center;
}
ul#primary-nav li ul a {
/* insures alignment */
    text-align: left;
    margin: 0px;
/* keeps it relative to it's container */
    position: relative;
/* less padding than first level no need for large links here */
    padding: 6px 3px 6px 15px;
/* if first level is set to bold this will reset this level */
    font-weight: normal;
/* first level is #FFF/white, we need black to contrast with light background */
    color: #000;
    border-top: 0 none;
    border-right: 0 none;
    border-left: 0 none;
}
ul#primary-nav li ul {
/* very lite grey color, by now you should know what the rest mean */
    background: #F3F5F5;
    margin: 0px;
    padding: 0px;
    position: absolute;
    width: auto;
    height: auto;
    display: none;
    position: absolute;
    z-index: 999;
    border-top: 1px solid #FFFFFF;
    border-bottom: 1px solid #374B51;
/*Info: The opacity property is  CSS3, however, will be valid just in CSS 3.1) http://jigsaw.w3.org/css-validator2) More Options chose CSS3 3) is full validate;)*/
    opacity: 0.95;
/* CSS 3 */
}
ul#primary-nav li ul ul {
/*Info: The opacity property is  CSS3, however, will be valid just in CSS 3.1) http://jigsaw.w3.org/css-validator2) More Options chose CSS3 3) is full validate;)*/
    opacity: 95;
/* CSS 3 */
}
/* Styling the appearance of menu items on hover */
#primary-nav li:hover,
#primary-nav li.menuh,
#primary-nav li.menuparenth,
#primary-nav li.menuactiveh {
/* set your image here, dark grey image */
    background:  url(uploads/ngrey/darknav.png) repeat-x left center;
    color: #000
}
/* The magic - set to work for up to a 3 level menu, but can be increased unlimited, for fourth level add
#primary-nav li:hover ul ul ul,
#primary-nav li.menuparenth ul ul ul,
*/
#primary-nav ul,
#primary-nav li:hover ul,
#primary-nav li:hover ul ul,
#primary-nav li.menuparenth ul,
#primary-nav li.menuparenth ul ul {
    display: none;
}
/* for fourth level add
#primary-nav ul ul ul li:hover ul,
#primary-nav ul ul ul li.menuparenth ul,
*/
#primary-nav li:hover ul,
#primary-nav ul li:hover ul,
#primary-nav ul ul li:hover ul,
#primary-nav li.menuparenth ul,
#primary-nav ul li.menuparenth ul,
#primary-nav ul ul li.menuparenth ul {
    display: block;
}
/* IE6 Hacks */
#primary-nav li li {
    float: left;
    clear: both;
}
#primary-nav li li a {
    height: 1%;
}
#5
Bonjour Bess,

Bon j'ai pas mal lu et pas mal travaillé, est-ce que tu veux bien regarder ce que ça donne mon menu?

le site est als formation langues le test est dans l'option test du menu



Je n'arrive pas à comprendre pourquoi les sous menus restent à gauche?

voici ma feuille de style:

Code :
[== CSS ==]
#menu_vert {
/* no margin/padding so it fills the whole div */
    margin: 0;
    padding: 0;
}
.clearb {
/* needed for some browsers */
    clear: both;
}
#menuwrapper {
/* set the background color for the menu here */
    background-color: #e45897;
/* IE6 Hack */
    height: 1%;
    width: auto;
/* one border at the top */
/* mettre une ligne au dessus de la bannière principale en haut */
    border-top: 1px solid #3F565C;
    margin: 0;
    padding: 0;
}
ul#primary-nav, ul#primary-nav ul {
/* remove any default bullets */
    list-style-type: none;
    margin: 0;
    padding: 0;
}
ul#primary-nav {
/* pushes the menu div up to give room above for background color to show */
    padding-top: 1px;
/* keeps the first menu item off the left side */
    padding-left: 10px;
}
ul#primary-nav ul {
/* make the ul stay in place so when we hover it lets the drops go over the content below else it will push everything below out of the way */
    position: absolute;
/* top being the bottom of the li it comes out of */
    top: auto;
/* keeps it hidden till hover event */
    display: none;
/* same size but different color for each border */
/* ici on met la largeur des cadres dans le sousmenu */
    border-top: 1px solid #C8D3D7;
    border-right: 1px solid #C8D3D7;
    border-bottom: 1px solid #ADC0C7;
    border-left: 1px solid #A5B9C0;
}
ul#primary-nav ul ul {
/* now we move the next level ul down from the top a little for distinction */
    margin-top: 1px;
/* pull it in on the left, helps us not lose the hover effect when going to next level */
    margin-left: -1px;
/* keeps the left side of this ul on the right side of the one it came out of */
    left: 100%;
/* sets the top of it inline with the li it came out of */
    top: 0px;
}
ul#primary-nav li {
/* floating left will set menu items to line up left to right else they will stack top to bottom */
*/ j'ai mis right pour que les colonnes qui rentrent pas en haut soit à droite*/
    float: right;
/* no margin/padding keeps them next to each other, the padding will be in the "a" */
/* c'est la marge entre chaque cadre du menu*/
    margin: 0px;
    padding: 0px;
}
#primary-nav li li {
/* Set the width of the menu elements at second level. Leaving first level flexible. */
    width: 200px;
/* removes any left margin it may have picked up from the first li */
    margin-left: 1px;
/* keeps them tight to the one above, no missed hovers */
    margin-top: -1px;
/* removes the left float set in first li so these will stack from top down */
    float: none;
/* relative to the ul they are in */
    position: relative;
}
/* set the "a" link look here */
ul#primary-nav li a {
/* specific font size, this could be larger or smaller than default font size */
    font-size: 1em;
/* make sure we keep the font normal */
    font-weight: normal;
/* set default link colors */
    color: #fff;
/* pushes out from the text, sort of like making links a certain size, if you give them a set width and/or height you may limit you ability to have as much text as you need */
    padding: 12px 15px 15px;
    display: block;
/* sets no underline on links */
    text-decoration: none;
}
ul#primary-nav li a:hover {
/* kind of obvious */
    background-color: transparent;
}
ul#primary-nav li li a:hover {
/* this is set to #000, black, below so hover will be white text */
    color: #FFF;
}
ul#primary-nav li a.menuactive {
    color: #000;
/* bold to set it off from non active */
    font-weight: bold;
/* set your image here */
    background:  url(uploads/ngrey/nav.png) repeat-x left 0px;
}
ul#primary-nav li a.menuactive:hover {
    color: #000;
/* keep it the same */
    font-weight: bold;
}
#primary-nav li li a.menuparent span {
/* makes it hold a shape */
    display: block;
/* set your image here, right arrow, 98% over from the left, 100% or 'right' puts it to far */
    background:  url(uploads/ngrey/parent.png) no-repeat 98% center;
}
/* gif for IE6, as it can't handle transparent png */
* html #primary-nav li li a.menuparent span {
/* set your image here, right arrow, 98% over from the left, 100% or 'right' puts it to far */
    background:  url(uploads/ngrey/parent.gif) no-repeat 98% center;
}
ul#primary-nav li ul a {
/* insures alignment */
    text-align: left;
    margin: 0px;
/* keeps it relative to it's container */
    position: relative;
/* less padding than first level no need for large links here */
    padding: 6px 3px 6px 15px;
/* if first level is set to bold this will reset this level */
    font-weight: normal;
/* first level is #FFF/white, we need black to contrast with light background */
    color: #000;
    border-top: 0 none;
    border-right: 0 none;
    border-left: 0 none;
}
ul#primary-nav li ul {
/* very lite grey color, by now you should know what the rest mean */
    background: #F3F5F5;
    margin: 0px;
    padding: 0px;
    position: absolute;
    width: auto;
    height: auto;
    display: none;
    position: absolute;
    z-index: 999;
    border-top: 1px solid #FFFFFF;
    border-bottom: 1px solid #374B51;
/*Info: The opacity property is  CSS3, however, will be valid just in CSS 3.1) http://jigsaw.w3.org/css-validator2) More Options chose CSS3 3) is full validate;)*/
    opacity: 0.95;
/* CSS 3 */
}
ul#primary-nav li ul ul {
/*Info: The opacity property is  CSS3, however, will be valid just in CSS 3.1) http://jigsaw.w3.org/css-validator2) More Options chose CSS3 3) is full validate;)*/
    opacity: 95;
/* CSS 3 */
}
/* Styling the appearance of menu items on hover */
#primary-nav li:hover,
#primary-nav li.menuh,
#primary-nav li.menuparenth,
#primary-nav li.menuactiveh {
/* set your image here, dark grey image */
    background:  url(uploads/ngrey/darknav.png) repeat-x left center;
    color: #000
}
/* The magic - set to work for up to a 3 level menu, but can be increased unlimited, for fourth level add
#primary-nav li:hover ul ul ul,
#primary-nav li.menuparenth ul ul ul,
*/
#primary-nav ul,
#primary-nav li:hover ul,
#primary-nav li:hover ul ul,
#primary-nav li.menuparenth ul,
#primary-nav li.menuparenth ul ul {
    display: none;
}
/* for fourth level add
#primary-nav ul ul ul li:hover ul,
#primary-nav ul ul ul li.menuparenth ul,
*/
#primary-nav li:hover ul,
#primary-nav ul li:hover ul,
#primary-nav ul ul li:hover ul,
#primary-nav li.menuparenth ul,
#primary-nav ul li.menuparenth ul,
#primary-nav ul ul li.menuparenth ul {
    display: block;
}
/* IE6 Hacks */
#primary-nav li li {
    float: left;
    clear: both;
}
#primary-nav li li a {
    height: 1%;
}
#6
compare ton site avec le mien http://www.furie.be/


ul#primary-nav li ul {
position: absolute;

change par -->
position: relative;

et nettoie ton code CSS car tu embarque ET l'ancien ET le nouveau Smile
#6
compare ton site avec le mien http://www.furie.be/


ul#primary-nav li ul {
position: absolute;

change par -->
position: relative;

et nettoie ton code CSS car tu embarque ET l'ancien ET le nouveau Smile
#7
Ohlala Merci bess tu es une génie! ou un génie? Big Grin

bon je continue...
#7
Ohlala Merci bess tu es une génie! ou un génie? Big Grin

bon je continue...
#8
un Smile

si c'est tout bon, ajoute [résolu] dans le titre de ton premier message en éditant stp Wink
#8
un Smile

si c'est tout bon, ajoute [résolu] dans le titre de ton premier message en éditant stp Wink
#9
Merci Bess pour ton aide!
#9
Merci Bess pour ton aide!


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)