[Résolu] Options menu en "font normal" au lieu d'être en "font bold"

Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
#1
Citation :#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
#~ Version du CMS : 1.6.6
#~ Version du MLE si existante : Non
#~ Informations Système :
#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
Bonjour,

J'ai un souci avec mon menu :

Je voudrais que les options "Photo gallery" et "Videos" soient en font bold au lieu d'être en font normal, car elle sont au même niveau que "Press". Même chose pour les options de "Team" et "Calendar".

Apparemment elle sont en normal car elles n'ont pas d'enfant, alors que "Press" en a.

[Image: menu9.jpg]

J'ai mis le menu en ligne :

Voici mon css :

Code :
@charset "utf-8";
/* CSS Document */
#menu_vert {
/* no margin/padding so it fills the whole div */
    margin: 0;
    padding: 0;
    outline: none;
}
.clearb {
/* needed for some browsers */
    clear: both;
}
#menuwrapper {
/* set the background color for the menu here */
    background-color: #fff;
/* IE6 Hack */
    height: 1%;
    width: auto;
    margin-top: 0px;
    padding: 0;
}
ul#primary-nav {
    list-style-type: none;
    margin: 0px;
    padding-top: 0px;
    padding-left: 80px;
}
#primary-nav ul {    
    background-color: #a2daf3;
    /* remove any default bullets */
    list-style-type: none;
/* sets width of second level ul to background image */
/*    width: 210px;*/
    margin: 0px;
    padding-left: 0px;
/* make the ul stay in place so when we hover it lets the drops go over the content instead of displacing it */
    position: absolute;
/* Pour que le sous-menu ne soit pas caché par le slideshow */
        z-index: 10;
/* top being the bottom of the li it comes out of */
    top: auto;
/* keeps it hidden till hover event */
    display: none;
/* room at top for li so image top shows correct */
    padding-top: 9px;
}
/* IE6 hacks on the above code */
* html #primary-nav ul {
    padding-top: 13px;
}
#primary-nav ul ul {
/* pour que les sous sous-menu soient en dessous des sous-menus */
    position:static;
/* insures no top margins */
    margin-top: 0px;
/* pulls the last ul back over the preceding ul */
    margin-left: -1px;
/* negative margin pulls the left centered in li next to it */
    top: -3px;
}
/* IE6 hacks on the above code */
* html #primary-nav ul ul {
    margin-top: 0px;
    padding-left: 5px;
    top: -7px;
}
#primary-nav li {
/* a little space to the left of each top level menu item */
    margin-left: 0px;
/* floating left will set menu items to line up left to right else they will stack top to bottom */
    float: left;
}
#primary-nav li li {
/* a little more space to the left of each menu item */
    margin-left: 8px;
/* 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;
}
/* IE6 hacks on the above code */
* html #primary-nav li li {
    margin-left: 6px;
/* helps hold it inside the ul */
    width: 171px;
}
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: #666;
/* doing tab menus require a bit different padding, this will give room on right for image to show, adjust to width of your image */
    padding: 0px 11px 0px 0px;
/* makes it hold a shape */
    display: block;
/* remove default "a" underline */
    text-decoration: none;
}
ul#primary-nav li a span {
/* takes normal "a" padding minus some for right image */
    padding: 12px 4px 12px 15px;
/* makes it hold a shape */
    display: block;
}
ul#primary-nav li a:hover {
/* kind of obvious */
    background-color: transparent;
}
ul#primary-nav li span {
/* set text color here also to insure color */
    color: #666;
/* just to be sure */
    font-weight: bold;
}
ul#primary-nav li li {
/* remove any image set in first level li */
    background:  none;
}
ul#primary-nav li li span {
/* remove any image set in first level li span */
    background:  none;
/* set text color here also to insure color */
    color: #666;
/* just to be sure */
font-weight: normal;
}
ul#primary-nav li:hover,
ul#primary-nav li.menuh,
ul#primary-nav li.menuparenth {
background-color: #ffff00;
}
ul#primary-nav li:hover span,
ul#primary-nav li.menuh span,
ul#primary-nav li.menuparenth span {
     background-color: #ffff00;
/* change text color on hover */
    color: #666;
/*    font-weight: bold;*/
}
/* IE6 hacks, the JS used for hover effect in IE6 puts class menuh on li, unless they have a class then just an "h" as seen above and below */
ul#primary-nav li li.menuh {
    background:  none;
    font-weight: normal;
}
/* IE6 hacks */
ul#primary-nav li.menuparenth li span {
    background:  none;
    color: #666;
    font-weight: normal;
}
/* IE6 hacks */
ul#primary-nav li.menuparenth li.menuparent span {
/* gif for IE6, as it can't handle transparent png */
/*    background:  url(uploads/ngrey/parent.gif) no-repeat right center;*/
    color: #666
}
/* IE6 hacks */
ul#primary-nav li.menuparenth li.menuh span {
    background:  none;
    color: #666;
    font-weight: normal;
}
/* IE6 hacks */
ul#primary-nav li.menuparenth li.menuparenth {
    background:  none;
    color: #666;
    font-weight: normal;
}
ul#primary-nav li.menuactive a {
background-color: #ffff00;
}
ul#primary-nav li a.menuactive span {
background-color: #ffff00;
    color: #666;
}
#primary-nav li li a {
/* second level padding, no image and not as big */
/*    padding: 5px 10px;*/
    padding: 0px;
/* to keep it within li */
    width: 165px;
/* space between them */
    margin: 5px;
    background: none;
}
/* IE6 hacks to above code */
* html #primary-nav li li a {
/*    padding: 5px 10px;*/
    padding: 0px;
    width: 165px;
    margin: 0px;
    color: #666;
}
#primary-nav li li:hover {
/* remove image set in first level */
    background: none;
}
#primary-nav li li a:hover {
    color: #666;
}
#primary-nav li.menuparent li a:hover span {
/* insures text color */
    color: #000;
    background:  url(uploads/ngrey/parent.gif) no-repeat left center;
}
#primary-nav li li.menuactive a.menuactive, #primary-nav li li.menuactive a.menuactive:hover {
    color: #666;
}
#primary-nav li li.menuactive a.menuactive span {
    color: #666;
}
#primary-nav li li.menuactive a.menuactive:hover span {
    color: #000;
}
/* IE6 hacks to above code */
#primary-nav li li.menuparenth a.menuparent span {
/* right arrow for menu parent, IE6 gif */
/*    background:  url(uploads/ngrey/parent.gif) no-repeat right center;*/
    color: #666;
}
/* IE6 hacks to above code */
#primary-nav li li.menuparenth a.menuparent:hover span {
    color: #666;
}
#primary-nav li li.menuparent a.menuparent span {
/* Pour supprimer l'espace du 1er sous sous-menu */
    float: left;
        font-weight: bold;
}
#primary-nav li.menuactive li a:hover span {
/* black text */
    color: #000;
}
ul#primary-nav li li a.menuactive  span {
/* remove image set in first level */
    background:  none;
    font-weight: normal;
}
#primary-nav li.menuactive li a {
/* second level active link color */
    color: #666;
    text-decoration: none;
    background: none;
}
#primary-nav li.menuactive li a:hover span {
    color: #000;
}
ul#primary-nav li:hover li a span {
    padding: 0 0 0 15px;
    background:  none;
    color: #666;
}
ul#primary-nav li.menuparenth li a span {
    padding: 0 0 0 15px;
    background:  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;
}
/* IE Hacks */
#primary-nav li li {
    float: left;
    clear: both;
}
#primary-nav li li a {
    height: 1%;
}
Pour info le menu est créé dynamiquement par le fichier "cssmenu_ulshadow.tpl"

Ca fait un bon moment que je suis dessus, mais je ne trouve pas la solution... Sad

Comment faire ?

Merci de votre aide
#1
Citation :#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
#~ Version du CMS : 1.6.6
#~ Version du MLE si existante : Non
#~ Informations Système :
#~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
Bonjour,

J'ai un souci avec mon menu :

Je voudrais que les options "Photo gallery" et "Videos" soient en font bold au lieu d'être en font normal, car elle sont au même niveau que "Press". Même chose pour les options de "Team" et "Calendar".

Apparemment elle sont en normal car elles n'ont pas d'enfant, alors que "Press" en a.

[Image: menu9.jpg]

J'ai mis le menu en ligne :

Voici mon css :

Code :
@charset "utf-8";
/* CSS Document */
#menu_vert {
/* no margin/padding so it fills the whole div */
    margin: 0;
    padding: 0;
    outline: none;
}
.clearb {
/* needed for some browsers */
    clear: both;
}
#menuwrapper {
/* set the background color for the menu here */
    background-color: #fff;
/* IE6 Hack */
    height: 1%;
    width: auto;
    margin-top: 0px;
    padding: 0;
}
ul#primary-nav {
    list-style-type: none;
    margin: 0px;
    padding-top: 0px;
    padding-left: 80px;
}
#primary-nav ul {    
    background-color: #a2daf3;
    /* remove any default bullets */
    list-style-type: none;
/* sets width of second level ul to background image */
/*    width: 210px;*/
    margin: 0px;
    padding-left: 0px;
/* make the ul stay in place so when we hover it lets the drops go over the content instead of displacing it */
    position: absolute;
/* Pour que le sous-menu ne soit pas caché par le slideshow */
        z-index: 10;
/* top being the bottom of the li it comes out of */
    top: auto;
/* keeps it hidden till hover event */
    display: none;
/* room at top for li so image top shows correct */
    padding-top: 9px;
}
/* IE6 hacks on the above code */
* html #primary-nav ul {
    padding-top: 13px;
}
#primary-nav ul ul {
/* pour que les sous sous-menu soient en dessous des sous-menus */
    position:static;
/* insures no top margins */
    margin-top: 0px;
/* pulls the last ul back over the preceding ul */
    margin-left: -1px;
/* negative margin pulls the left centered in li next to it */
    top: -3px;
}
/* IE6 hacks on the above code */
* html #primary-nav ul ul {
    margin-top: 0px;
    padding-left: 5px;
    top: -7px;
}
#primary-nav li {
/* a little space to the left of each top level menu item */
    margin-left: 0px;
/* floating left will set menu items to line up left to right else they will stack top to bottom */
    float: left;
}
#primary-nav li li {
/* a little more space to the left of each menu item */
    margin-left: 8px;
/* 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;
}
/* IE6 hacks on the above code */
* html #primary-nav li li {
    margin-left: 6px;
/* helps hold it inside the ul */
    width: 171px;
}
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: #666;
/* doing tab menus require a bit different padding, this will give room on right for image to show, adjust to width of your image */
    padding: 0px 11px 0px 0px;
/* makes it hold a shape */
    display: block;
/* remove default "a" underline */
    text-decoration: none;
}
ul#primary-nav li a span {
/* takes normal "a" padding minus some for right image */
    padding: 12px 4px 12px 15px;
/* makes it hold a shape */
    display: block;
}
ul#primary-nav li a:hover {
/* kind of obvious */
    background-color: transparent;
}
ul#primary-nav li span {
/* set text color here also to insure color */
    color: #666;
/* just to be sure */
    font-weight: bold;
}
ul#primary-nav li li {
/* remove any image set in first level li */
    background:  none;
}
ul#primary-nav li li span {
/* remove any image set in first level li span */
    background:  none;
/* set text color here also to insure color */
    color: #666;
/* just to be sure */
font-weight: normal;
}
ul#primary-nav li:hover,
ul#primary-nav li.menuh,
ul#primary-nav li.menuparenth {
background-color: #ffff00;
}
ul#primary-nav li:hover span,
ul#primary-nav li.menuh span,
ul#primary-nav li.menuparenth span {
     background-color: #ffff00;
/* change text color on hover */
    color: #666;
/*    font-weight: bold;*/
}
/* IE6 hacks, the JS used for hover effect in IE6 puts class menuh on li, unless they have a class then just an "h" as seen above and below */
ul#primary-nav li li.menuh {
    background:  none;
    font-weight: normal;
}
/* IE6 hacks */
ul#primary-nav li.menuparenth li span {
    background:  none;
    color: #666;
    font-weight: normal;
}
/* IE6 hacks */
ul#primary-nav li.menuparenth li.menuparent span {
/* gif for IE6, as it can't handle transparent png */
/*    background:  url(uploads/ngrey/parent.gif) no-repeat right center;*/
    color: #666
}
/* IE6 hacks */
ul#primary-nav li.menuparenth li.menuh span {
    background:  none;
    color: #666;
    font-weight: normal;
}
/* IE6 hacks */
ul#primary-nav li.menuparenth li.menuparenth {
    background:  none;
    color: #666;
    font-weight: normal;
}
ul#primary-nav li.menuactive a {
background-color: #ffff00;
}
ul#primary-nav li a.menuactive span {
background-color: #ffff00;
    color: #666;
}
#primary-nav li li a {
/* second level padding, no image and not as big */
/*    padding: 5px 10px;*/
    padding: 0px;
/* to keep it within li */
    width: 165px;
/* space between them */
    margin: 5px;
    background: none;
}
/* IE6 hacks to above code */
* html #primary-nav li li a {
/*    padding: 5px 10px;*/
    padding: 0px;
    width: 165px;
    margin: 0px;
    color: #666;
}
#primary-nav li li:hover {
/* remove image set in first level */
    background: none;
}
#primary-nav li li a:hover {
    color: #666;
}
#primary-nav li.menuparent li a:hover span {
/* insures text color */
    color: #000;
    background:  url(uploads/ngrey/parent.gif) no-repeat left center;
}
#primary-nav li li.menuactive a.menuactive, #primary-nav li li.menuactive a.menuactive:hover {
    color: #666;
}
#primary-nav li li.menuactive a.menuactive span {
    color: #666;
}
#primary-nav li li.menuactive a.menuactive:hover span {
    color: #000;
}
/* IE6 hacks to above code */
#primary-nav li li.menuparenth a.menuparent span {
/* right arrow for menu parent, IE6 gif */
/*    background:  url(uploads/ngrey/parent.gif) no-repeat right center;*/
    color: #666;
}
/* IE6 hacks to above code */
#primary-nav li li.menuparenth a.menuparent:hover span {
    color: #666;
}
#primary-nav li li.menuparent a.menuparent span {
/* Pour supprimer l'espace du 1er sous sous-menu */
    float: left;
        font-weight: bold;
}
#primary-nav li.menuactive li a:hover span {
/* black text */
    color: #000;
}
ul#primary-nav li li a.menuactive  span {
/* remove image set in first level */
    background:  none;
    font-weight: normal;
}
#primary-nav li.menuactive li a {
/* second level active link color */
    color: #666;
    text-decoration: none;
    background: none;
}
#primary-nav li.menuactive li a:hover span {
    color: #000;
}
ul#primary-nav li:hover li a span {
    padding: 0 0 0 15px;
    background:  none;
    color: #666;
}
ul#primary-nav li.menuparenth li a span {
    padding: 0 0 0 15px;
    background:  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;
}
/* IE Hacks */
#primary-nav li li {
    float: left;
    clear: both;
}
#primary-nav li li a {
    height: 1%;
}
Pour info le menu est créé dynamiquement par le fichier "cssmenu_ulshadow.tpl"

Ca fait un bon moment que je suis dessus, mais je ne trouve pas la solution... Sad

Comment faire ?

Merci de votre aide
#2
Bonjour,
Essaye de modifier le fichier de ton menu :
_________________________________________________________
<li class="menuparent">
<a class="menuparent" href="#"><span>Photo Gallery</span></a>
</li>
<li class="menuparent">
<a class="menuparent" href="#"><span>Videos</span></a>
</li>
_________________________________________________________


Ces lignes dépendent du CSS :
_________________________________________________________

#primary-nav li li.menuparent a.menuparent span {
/* Pour supprimer l'espace du 1er sous sous-menu */
float: left;
font-weight: bold;
}
_________________________________________________________

Qui contient l'attribut "bold" pour ce niveau de menu.


J'espère t'avoir aidé. =)
#2
Bonjour,
Essaye de modifier le fichier de ton menu :
_________________________________________________________
<li class="menuparent">
<a class="menuparent" href="#"><span>Photo Gallery</span></a>
</li>
<li class="menuparent">
<a class="menuparent" href="#"><span>Videos</span></a>
</li>
_________________________________________________________


Ces lignes dépendent du CSS :
_________________________________________________________

#primary-nav li li.menuparent a.menuparent span {
/* Pour supprimer l'espace du 1er sous sous-menu */
float: left;
font-weight: bold;
}
_________________________________________________________

Qui contient l'attribut "bold" pour ce niveau de menu.


J'espère t'avoir aidé. =)
#3
Merci pour ton aide

Le souci est que le menu est créé dynamiquement par le fichier "cssmenu_ulshadow.tpl"... Il vaut donc mieux intervenir dans le css.

Pour mieux comprendre j'ai ajouté des enfants à "Photo gallery", du coup l'option est passée en bold. On voit que "Videos" est restée en normal, alors qu'elle est au même niveau "Photo gallery", "Press" ou "Backstage". J'aimerais qu'elle apparaisse en bold.

[Image: menu10.jpg]

Merci de votre aide
#3
Merci pour ton aide

Le souci est que le menu est créé dynamiquement par le fichier "cssmenu_ulshadow.tpl"... Il vaut donc mieux intervenir dans le css.

Pour mieux comprendre j'ai ajouté des enfants à "Photo gallery", du coup l'option est passée en bold. On voit que "Videos" est restée en normal, alors qu'elle est au même niveau "Photo gallery", "Press" ou "Backstage". J'aimerais qu'elle apparaisse en bold.

[Image: menu10.jpg]

Merci de votre aide
#4
La solution :

Il faut modifier cette règle :
Code :
ul#primary-nav li li span {
  background:none repeat scroll 0 0 transparent;
  color:#666666;
  font-weight:normal;/* Supprimer ceci */
}
Et ajouter celle-ci :
Code :
ul#primary-nav ul.unli ul.unli li span {
     font-weight:normal;
}
#4
La solution :

Il faut modifier cette règle :
Code :
ul#primary-nav li li span {
  background:none repeat scroll 0 0 transparent;
  color:#666666;
  font-weight:normal;/* Supprimer ceci */
}
Et ajouter celle-ci :
Code :
ul#primary-nav ul.unli ul.unli li span {
     font-weight:normal;
}


Atteindre :


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