Classe "mainmenu"

2 participants

Voir le sujet précédent Voir le sujet suivant Aller en bas

Résolu Classe "mainmenu"

Message par SnowBlue Mer 29 Mai 2013 - 17:05

Bonjour !

J'ai un problème avec la classe "mainmenu" : je l'ai utilisée dans mon CSS pour personnaliser le menu de navigation, seulement il semble que cette classe s'applique également aux liens du profil, ce qui a des effets indésirables.

Spoiler:

J'aimerais pouvoir personnaliser les liens de la barre de navigation tout en gardant des liens du profil "de base". Quelqu'un aurait-il une solution ? Y a-t-il moyen de dissocier les deux ?
Merci d'avance !


Dernière édition par SnowBlue le Jeu 30 Mai 2013 - 7:46, édité 1 fois
SnowBlue

SnowBlue
***

Messages : 142
Inscrit(e) le : 29/01/2012

http://sweetcakes.superforum.fr/
SnowBlue a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Classe "mainmenu"

Message par Anzu Mer 29 Mai 2013 - 17:44


Bonsoir,

Dans le template overall header > Affichage > Templates > Général

Repérez:

Code:
   <table cellspacing="0" cellpadding="0" border="0" align="{MENU_POSITION}">
               <tr>
                  <td class="blabla" align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</td>
               </tr>
            </table>

Dans le td, vous rajoutez class="blabla" par exemple.

Cordialement.
Anzu

Anzu
Membre actif

Féminin
Messages : 20685
Inscrit(e) le : 30/08/2007

https://forum.forumactif.com/
Anzu a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Classe "mainmenu"

Message par SnowBlue Mer 29 Mai 2013 - 18:01

Merci beaucoup !

Seulement, j'ai mis la barre de navigation en haut du forum (grâce au tutoriel de FA) et ce code ne semble que remplacer la classe "navig" qui avait été mise en place à ce moment-là... Liens du menu et du profil sont eux toujours les mêmes !... :/
SnowBlue

SnowBlue
***

Messages : 142
Inscrit(e) le : 29/01/2012

http://sweetcakes.superforum.fr/
SnowBlue a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Classe "mainmenu"

Message par Anzu Mer 29 Mai 2013 - 18:19

Ah dans ce cas ^^

Vous pouvez utiliser ces codes:

Code:
a.mainmenu {
    color: #000000;
    font-size: 15px;
  font-weight: bold;
}

.gen a.mainmenu{
      color: #ffffff;
    font-size: 20px;
  font-weight: black;
}

.three-col .gen strong {
      color: #ffffff;
    font-size: 20px;
  font-weight: black;
}

Le premier donc pour la barre de navigation et le reste concerne les liens du profil. Le dernier c'est pour quand l'onglet est actif.

Cordialement.
Anzu

Anzu
Membre actif

Féminin
Messages : 20685
Inscrit(e) le : 30/08/2007

https://forum.forumactif.com/
Anzu a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Classe "mainmenu"

Message par SnowBlue Mer 29 Mai 2013 - 18:28

Après personnalisation, j'obtiens ce code pour les onglets du profil :

Code:
.gen a.mainmenu{
      color: #4D3C2F;
    background-color:#none !important;
  padding:0px !important;
  border:0px solid red !important;
}
 
.three-col .gen strong {
      color: #C53C54;
    background-color:#none !important;
  padding:0px !important;
  border:0px solid red !important;
}

Cependant, il reste toujours quelques "résidus" de la barre de navigation Confused :
Classe "mainmenu" 2ymsi1x
SnowBlue

SnowBlue
***

Messages : 142
Inscrit(e) le : 29/01/2012

http://sweetcakes.superforum.fr/
SnowBlue a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Classe "mainmenu"

Message par Anzu Mer 29 Mai 2013 - 18:31

Pourrais je avoir si possible:

• Le lien du forum concerné
• La css (du moins ce qui concerne la barre de navig, les liens, etc)
• votre template overall header.

Edit: effectivement, en rajoutant un fond, il se met partout Razz

Cordialement.


Dernière édition par Anzu le Mer 29 Mai 2013 - 18:38, édité 1 fois
Anzu

Anzu
Membre actif

Féminin
Messages : 20685
Inscrit(e) le : 30/08/2007

https://forum.forumactif.com/
Anzu a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Classe "mainmenu"

Message par SnowBlue Mer 29 Mai 2013 - 18:34

Pas de souci !

Le lien du forum : http://sweetcakes.superforum.fr/

Le CSS :
Code:
        .navig {
        position: fixed;
        top: -15px;
        width: 100%;
  transition:1s;
        }

        .navig:hover {
        position: fixed;
        top: 2px;
        width: 100%;
  transition:1s;
        }

        a.mainmenu img{
        display: none;
        }

.mainmenu {
  background-color:#EED49D;
  padding-top:9px;
  padding-left:4px;
  padding-right:4px;
  padding-bottom:2px;
  border-radius:0px 0px 10px 10px;
  -moz-border-radius:0px 0px 10px 10px;
  -webkit-border-radius:0px 0px 10px 10px;
  border:1px dotted #A0522D;
}

        a.mainmenu {
        margin: 5px;
        font-family: 'Pompiere';
        font-size: 24px;
  color:#A0522D;
        }

a.mainmenu:hover { color:#EAC968;
transition:1s; }



a { text-decoration:none !important; }
a:hover { text-decoration:none !important; }

        body{
        margin-top: -1px;
        margin-bottom: 0px;
        }


.bodyline { margin:20px;
border-left:5px solid #EAC968;
  border-right:5px solid #EAC968;
  border-top:0px solid #EAC968;
  border-bottom:0px solid #EAC968;
}
.forumline { border-left:0px solid red;
  border-right:0px solid red; }


    .icon_online {
    position:absolute;
    halign:right;
    valign:top;}


.forumlink { margin-left:20px;
  font-family: 'Pompiere';
  font-size:20px;
width:100%;
font-variant:small-caps;
letter-spacing:1px;}

.forumlink:hover { opacity:0.9;
transition:1s;}


.postbody { text-align:justify;
padding-left:5px;
padding-right:5px; }

.name { font-family:'Pompiere';
  font-size:14px;
text-align:center; }


.gen a.mainmenu{
      color: #4D3C2F;
    background-color:#none !important;
  padding:0px !important;
  border:0px solid red !important;
}
 
.three-col .gen strong {
      color: #C53C54;
    background-color:#none !important;
  padding:0px !important;
  border:0px solid red !important;
}

Le template overall_header :
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" id="min-width" lang="{L_LANG_HTML}" xml:lang="{L_LANG_HTML}" {NAMESPACE_FB_LIKE} {NAMESPACE_FB} {NAMESPACE_BBCODE}>
<head>
  <link href='http://fonts.googleapis.com/css?family=Pompiere|Patrick+Hand+SC' rel='stylesheet' type='text/css'>
   <title>{SITENAME_TITLE}{PAGE_TITLE}</title>
   <meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
   <meta http-equiv="content-script-type" content="text/javascript" />
   <meta http-equiv="content-style-type" content="text/css" />
   <!-- BEGIN switch_compat_meta -->
   <meta http-equiv="X-UA-Compatible" content="IE={switch_compat_meta.VERSION}" />
   <!-- END switch_compat_meta -->
   <!-- BEGIN switch_canonical_url -->
   <link rel="canonical" href="{switch_canonical_url.CANONICAL_URL}" />
   <!-- END switch_canonical_url -->
   {META_FAVICO}
   {META}
   {META_FB_LIKE}
   <meta name="title" content="{SITENAME_TITLE}{PAGE_TITLE}" />
   {T_HEAD_STYLESHEET}
   {CSS}
   <link rel="search" type="application/opensearchdescription+xml" href="/improvedsearch.xml" title="{SITENAME}" />
   <link rel="search" type="application/opensearchdescription+xml" href="{URL_BOARD_DIRECTORY}/search/improvedsearch.xml" title="{SEARCH_FORUMS}" />
   <script src="{JQUERY_PATH}" type="text/javascript"></script>
   <script src="{JS_DIR}{L_LANG}.js" type="text/javascript"></script>

   <!-- BEGIN switch_fb_login -->
   <script src="http://connect.facebook.net/{switch_fb_login.FB_LOCAL}/all.js" type="text/javascript"></script>
   <script src="{switch_fb_login.JS_FB_LOGIN}" type="text/javascript"></script>
   <!-- END switch_fb_login -->

   <!-- BEGIN switch_ticker -->
   <link type="text/css" rel="stylesheet" href="{JS_DIR}jquery/ticker/ticker.css" />
   <script src="{JS_DIR}jquery/ticker/ticker.js" type="text/javascript"></script>
   <!-- END switch_ticker -->

   <!-- BEGIN switch_ticker_new -->
   <script src="{JS_DIR}jquery/jcarousel/jquery.jcarousel.js" type="text/javascript"></script>
   <script type="text/javascript">//<![CDATA[
      /* Definir le sens de direction en fonction du panneau admin */
      var tickerDirParam = "{switch_ticker.DIRECTION}";
      var slid_vert = false;
      var auto_dir = 'next';
      var h_perso = parseInt({switch_ticker.HEIGHT});

      switch( tickerDirParam )
      {
         case 'top' :
            slid_vert = true;
            break;

         case 'left':
            break;

         case 'bottom':
            slid_vert = true;
            auto_dir = 'prev';
            break;

         case 'right':
            auto_dir = 'prev';
            break;

         default:
            slid_vert = true;
      }

      $(document).ready(function() {
         var w_cont = $('#fa_ticker_container').width();

         if (w_cont > 0)
         {
            $('#fa_ticker_container').width(w_cont);

            /* Affichage de la liste */
            $('#fa_ticker_content').css('display','block');

            /* Calcul des dimensions du conteneur et des elements */
            var width_max = $('ul#fa_ticker_content').width();
            var width_item = Math.floor(width_max / {switch_ticker.SIZE});
            var height_max = h_perso;

            /* Calcul de la hauteur maximale du conteneur en fonction des elements et de la hauteur personnalisee dans l'admin */
            $('ul#fa_ticker_content li').each( function () {
               if ($(this).height() > height_max)
               {
                  height_max = $(this).height();
               }
            } );

            /* Redimensionnement des elements et des images trop larges */
            $('ul#fa_ticker_content li').width(width_item).height(height_max).find('img').each(function () {
               if ($(this).width() > width_item)
               {
               var ratio      = $(this).width() / width_item;
               var new_height = Math.round($(this).height() / ratio);
               $(this).height(new_height).width(width_item);
               }
            });

            /* Redimensionnement et centrage du conteneur en mode vertical */
            if (slid_vert)
            {
               $('ul#fa_ticker_content').width(width_item).height(height_max).css('marginLeft','auto').css('marginRight','auto');
            }

            /* Initialisation du caroussel */
            $('#fa_ticker_content').jcarousel({
                  vertical: slid_vert,
               wrap: 'circular',
               auto: {switch_ticker.STOP_TIME},
               auto_direction: auto_dir,
            scroll: 1,
            size: {switch_ticker.SIZE},
            height_max: height_max,
            animation: {switch_ticker.SPEED}
            });
         }
         else
         {
            $('ul#fa_ticker_content li:not(:first)').css('display','none');
            $('ul#fa_ticker_content li:first').css('list-style','none').css('text-align','center');
         }
      });
   //]]>
   </script>
   <!-- END switch_ticker_new -->

   <script type="text/javascript">//<![CDATA[
   $(document).ready(function(){
      <!-- BEGIN switch_enable_pm_popup -->
         pm = window.open('{U_PRIVATEMSGS_POPUP}', '_faprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
         if(pm != null) { pm.focus(); }
      <!-- END switch_enable_pm_popup -->
      <!-- BEGIN switch_report_popup -->
         report = window.open('{switch_report_popup.U_REPORT_POPUP}', '_phpbbreport', 'HEIGHT={switch_report_popup.S_HEIGHT},resizable=yes,scrollbars=no,WIDTH={switch_report_popup.S_WIDTH}');
         if(report != null) { report.focus(); }
      <!-- END switch_report_popup -->
      <!-- BEGIN switch_ticker -->
         ticker_start({switch_ticker.HEIGHT}, {switch_ticker.SPACING}, {switch_ticker.SPEED}, '{switch_ticker.DIRECTION}', {switch_ticker.STOP_TIME});
      <!-- END switch_ticker -->
   });

   <!-- BEGIN switch_login_popup -->
      var logInPopUpLeft, logInPopUpTop, logInPopUpWidth = {LOGIN_POPUP_WIDTH}, logInPopUpHeight = {LOGIN_POPUP_HEIGHT}, logInBackgroundResize = true, logInBackgroundClass = false;
   <!-- END switch_login_popup -->

   <!-- BEGIN switch_login_popup -->
   $(document).ready( function() {
      $(window).resize(function() {
         var windowWidth = document.documentElement.clientWidth;
         var popupWidth = $("#login_popup").width();
         var mypopup = $("#login_popup");

         $("#login_popup").css({
         "left": windowWidth/2 - popupWidth/2
            });
      });
   });
   <!-- END switch_login_popup -->
   //]]>
   </script>
   {GREETING_POPUP}
   <!-- BEGIN switch_ticker_new -->
   <style>
   .jcarousel-skin-tango .jcarousel-item {
      text-align:center;
      width: 10px;
   }

   .jcarousel-skin-tango .jcarousel-item-horizontal {
      margin-right: {switch_ticker.SPACING}px;
   }

   .jcarousel-skin-tango .jcarousel-item-vertical {
      margin-bottom: {switch_ticker.SPACING}px;
   }
   </style>
   <!-- END switch_ticker_new -->
   {HOSTING_JS}
   <!-- BEGIN google_analytics_code -->
   <script type="text/javascript">
   //<![CDATA[
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', '{G_ANALYTICS_ID}']);
    _gaq.push(['_trackPageview']);
   _gaq.push(['_trackPageLoadTime']);

   <!-- BEGIN google_analytics_code_bis -->
   _gaq.push(['b._setAccount', '{G_ANALYTICS_ID_BIS}']);
   _gaq.push(['b._trackPageview']);
   <!-- END google_analytics_code_bis -->

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
   //]]>
   </script>
   <!-- END google_analytics_code -->
</head>
<body background="{T_BODY_BACKGROUND}" bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">

                  <div class="navig" align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</div>

   <!-- BEGIN hitskin_preview -->
   <div id="hitskin_preview" style="display: block;">
      <h1><img src="http://2img.net/i/fa/hitskin/hitskin_logo.png" alt="" /> Hit<em>skin</em>.com</h1>
      <div class="content">
         <p>
            {hitskin_preview.L_THEME_SITE_PREVIEW}
            <br />
            <span>{hitskin_preview.U_INSTALL_THEME}<a href="http://{hitskin_preview.U_RETURN_THEME}">{hitskin_preview.L_RETURN_THEME}</a></span>
         </p>
      </div>
   </div>
   <!-- END hitskin_preview -->

   <!-- BEGIN switch_login_popup -->
   <div id="login_popup">
      <table class="forumline" width="{LOGIN_POPUP_WIDTH}" height="{LOGIN_POPUP_HEIGHT}" border="0" cellspacing="1" cellpadding="0">
         <tr height="25">
            <td class="catLeft">
               <span class="genmed module-title">{SITENAME}</span>
            </td>
         </tr>
         <tr height="{LOGIN_POPUP_MSG_HEIGHT}">
            <td class="row1" align="left" valign="top">
               <div id="login_popup_buttons">
                  <form action="{S_LOGIN_ACTION}" method="get">
                     <input type="submit" class="mainoption" value="{L_LOGIN}" />
                     <input type="button" class="mainoption" value="{L_REGISTER}" onclick="parent.location='{U_REGISTER}';" />
                     <input id="login_popup_close" type="button" class="button" value="{L_DONT_DISPLAY_AGAIN}" />
                  </form>
               </div>
               <span class="genmed">{LOGIN_POPUP_MSG}</span>
            </td>
         </tr>
      </table>
   </div>
   <!-- END switch_login_popup -->

   <a name="top"></a>
   {JAVASCRIPT}

   <table class="bodylinewidth" width="{T_BODY_TABLE_WIDTH}" cellspacing="0" cellpadding="0" border="0" align="center">
      <tr>
         <td class="bodyline">
            <table width="100%" cellspacing="0" cellpadding="0" border="0">
               <tr>
                  <!-- BEGIN switch_logo_left -->
                  <td><a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
                  <!-- END switch_logo_left -->
                  <td align="center" width="100%" valign="middle">
                     <!-- BEGIN switch_logo_center -->
                     <a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a>
                     <br />
                     <!-- END switch_logo_center -->
                     <div class="maintitle">{MAIN_SITENAME}</div>
                     <br />
                     <span class="gen">{SITE_DESCRIPTION}<br />  </span>
                  </td>
                  <!-- BEGIN switch_logo_right -->
                  <td><a href="{U_INDEX}"><img src="{LOGO}" id="i_logo" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
                  <!-- END switch_logo_right -->
               </tr>
            </table>


            <div style="clear: both;"></div>

            <!-- BEGIN switch_ticker_new -->
            <div id="fa_ticker_block" style="margin-top:4px;margin-bottom:4px;">
               <table width="100%" border="0" cellspacing="0" cellpadding="0" class="forumline">
                  <tr>
                     <td align="left" class="row1">
                        <div id="fa_ticker_container">
                           <ul id="fa_ticker_content" class="jcarousel-skin-tango" style="display:none;">
                              <!-- BEGIN ticker_row -->
                              <li>{switch_ticker.ticker_row.ELEMENT}</li>
                              <!-- END ticker_row -->
                           </ul>
                        </div>
                     </td>
                  </tr>
               </table>
            </div>
            <!-- END switch_ticker_new -->

            <!-- BEGIN switch_ticker -->
            <div id="fa_ticker_block" style="margin-top:4px;margin-bottom:4px;">
               <table width="100%" border="0" cellspacing="0" cellpadding="0" class="forumline">
                  <tr>
                     <td align="left" class="row1">
                        <div id="fa_ticker_container">
                           <div id="fa_ticker" style="height:{switch_ticker.HEIGHT}px;">
                              <div class="fa_ticker_content">
                                 <!-- BEGIN ticker_row -->
                                 <div>{switch_ticker.ticker_row.ELEMENT}</div>
                                 <!-- END ticker_row -->
                              </div>
                           </div>
                        </div>
                     </td>
                  </tr>
               </table>
            </div>
            <!-- END switch_ticker -->

            <div id="page-body">
               <div id="{ID_CONTENT_CONTAINER}"{CLASS_CONTENT_CONTAINER}>
                  <table cellpadding="0" cellspacing="0" width="100%" class="three-col">
                     <tbody>
                        <tr>
                           <td valign="top" width="{C1SIZE}">
                              <div id="{ID_LEFT}">
                                 <!-- BEGIN giefmod_index1 -->
                                 {giefmod_index1.MODVAR}
                                    <!-- BEGIN saut -->
                                    <div style="height:{SPACE_ROW}px"></div>
                                    <!-- END saut -->
                                 <!-- END giefmod_index1 -->
                              </div>
                           </td>
                           <td valign="top" width="100%">
<!-- BEGIN html_validation -->
                           </td>
                        </tr>
                     </tbody>
                  </table>
               </div>
            </div>
         </td>
      </tr>
   </table>
</body>
</html>
<!-- END html_validation -->
SnowBlue

SnowBlue
***

Messages : 142
Inscrit(e) le : 29/01/2012

http://sweetcakes.superforum.fr/
SnowBlue a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Classe "mainmenu"

Message par Anzu Mer 29 Mai 2013 - 18:54

J'ai l'impression qu'il n'y a pas moyen d'y remédier. Confused

Vous pouvez toujours mettre le background dans le .navig, mais du coup vous aurez "une barre" et non des boutons séparés et je doute que c'est ce que vous voulez Razz

Sinon, refaire "manuellement" la barre de navigation en mettant les liens dans le template etc ..
Anzu

Anzu
Membre actif

Féminin
Messages : 20685
Inscrit(e) le : 30/08/2007

https://forum.forumactif.com/
Anzu a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Classe "mainmenu"

Message par SnowBlue Jeu 30 Mai 2013 - 7:46

En effet, ça n'est pas exactement ce que je veux...

Merci beaucoup en tout cas d'avoir essayé ! Pour ce qui est des templates, je ferai ça quand j'en aurai le courage...
SnowBlue

SnowBlue
***

Messages : 142
Inscrit(e) le : 29/01/2012

http://sweetcakes.superforum.fr/
SnowBlue a été remercié(e) par l'auteur de ce sujet.

Voir le sujet précédent Voir le sujet suivant Revenir en haut

- Sujets similaires

Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum