Centrer la cellule Titre de Catégorie

2 participants

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

Résolu Centrer la cellule Titre de Catégorie

Message par N3m0 Sam 15 Nov 2014 - 10:47

Détails techniques


Version du forum : phpBB2
Poste occupé : Fondateur
Navigateur(s) concerné(s) : Mozilla Firefox
Capture d'écran du problème :
Voir l'image:

Personnes concernées par le problème : Tous les utilisateurs
Lien du forum : http://testnemo.forumactif.org/

Description du problème

Bonjour !

J'aimerais pouvoir centrer correctement le titre de catégorie, non pas avec un center car, ça je l'ai déjà mais, c'est plus vis à vis du tableau. J'ai beau mettre tous les colspan possible, cela ne change rien. (cf le screen fournis) A l'endroit du carré rouge, il semble y avoir une colonne invisible et, j'aimerais a faire sauter afin que le titre soit complètement au centre et donc, que j'image de la barre grise aille jusqu'à l'autre extrémité. Voici mon template.
Code:
        <table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
          <tr>
              <td valign="bottom">
                <!-- BEGIN switch_user_logged_in -->
                <span class="gensmall">{LAST_VISIT_DATE}<br />
                {CURRENT_TIME}<br />
                </span>
                <!-- END switch_user_logged_in -->
                <div class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_CAT_DESC}</div>
              </td>
              <td class="gensmall" align="right" valign="bottom">
                <!-- BEGIN switch_user_logged_in -->
                <a class="gensmall" href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><br />
                <a class="gensmall" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a><br />
                <!-- END switch_user_logged_in -->
                <a class="gensmall" href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a>
              </td>
          </tr>
        </table>
        <!-- BEGIN catrow --><!-- BEGIN tablehead -->
        <table class="forumline" width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
                  <!-- TITRE CATEGORIE -->
                  <th colspan="3" nowrap="nowrap" width="100%" class="secondarytitle">{catrow.tablehead.L_FORUM}</th>
          </tr>
          <!-- END tablehead -->
          <!-- BEGIN cathead -->
          <tr>
              <!-- BEGIN inc -->
              <td class="{catrow.cathead.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
              <!-- END inc -->
              <td class="{catrow.cathead.CLASS_CAT}" colspan="{catrow.cathead.INC_SPAN}" width="100%">
                <h{catrow.cathead.LEVEL} class="hierarchy">
                    <span class="cattitle">
                      <a class="cattitle" title="{catrow.cathead.CAT_DESC}" href="{catrow.cathead.U_VIEWCAT}">{catrow.cathead.CAT_TITLE}</a>
                                          </span>
                </h{catrow.cathead.LEVEL}>
              </td>
              <td class="{catrow.cathead.CLASS_ROWPIC}" colspan="{catrow.forumrow.INC_SPAN}" align="right">&nbsp;</td>
          </tr>
          <!-- END cathead -->
          <!-- BEGIN forumrow -->
          <tr>
              <!-- BEGIN inc -->
              <td class="{catrow.forumrow.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" alt="." /></td>
              <!-- END inc -->
              <td class="row1 over" colspan="3" valign="top" width="80%" height="50">
                <h{catrow.forumrow.LEVEL} class="hierarchy">
                    <span class="forumlink">
                      <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a>
                    </span>
                                  <div class="bordsou"></div>
                                  </h{catrow.forumrow.LEVEL}>
                                  <div class="last_mess">{catrow.forumrow.POSTS} mess - {catrow.forumrow.TOPICS} topics ; <span class="gensmall" id="last">{catrow.forumrow.LAST_POST}</span></div>
        <script type="text/javascript">
          jQuery('#last').html(jQuery('#last').html().replace(/<br>/g,'<span style="display: inline-block; padding: 0 2px;">-</span>')).removeAttr('id');
          </script>       
                          <div class="genmed">{catrow.forumrow.FORUM_DESC}</div>
                  </td>
                  <td valign="top" width="20%">
                    <div class="imgsou"><img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></div>
                                  <div class="listsou"><span id="subforums">  {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</span></div>
                <script type="text/javascript">
                  jQuery('#subforums').html(jQuery('#subforums').html().replace(/, /g,' <br />')).removeAttr('id');
                </script>
                  </td>
          </tr>
          <!-- END forumrow -->
          <!-- BEGIN catfoot -->
          <tr>
              <!-- BEGIN inc -->
              <td class="{catrow.catfoot.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
              <!-- END inc -->
              <td class="spaceRow" colspan="{catrow.catfoot.INC_SPAN}" height="1"><img src="{SPACER}" alt="" height="1" width="1" /></td>
          </tr>
          <!-- END catfoot -->
          <!-- BEGIN tablefoot -->
        </table><img src="{SPACER}" alt="" height="5" width="1" /><!-- END tablefoot --><!-- END catrow -->

Je vous remercie d'avance.
Bonne journée

Cordialement.


Dernière édition par N3m0 le Ven 21 Nov 2014 - 14:50, édité 1 fois
avatar

N3m0
*

Féminin
Messages : 43
Inscrit(e) le : 23/06/2014

http://eterniacity.forumactif.org/
N3m0 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Centrer la cellule Titre de Catégorie

Message par N3m0 Jeu 20 Nov 2014 - 18:35

Up s'il vous plait ?
avatar

N3m0
*

Féminin
Messages : 43
Inscrit(e) le : 23/06/2014

http://eterniacity.forumactif.org/
N3m0 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Centrer la cellule Titre de Catégorie

Message par MlleAlys Jeu 20 Nov 2014 - 19:43

Bonjour,
logiquement la cellule du titre de la catégorie est la seule qui a besoin d'un colspan. Essayez ainsi ?
Code:
        <table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
          <tr>
              <td valign="bottom">
                <!-- BEGIN switch_user_logged_in -->
                <span class="gensmall">{LAST_VISIT_DATE}<br />
                {CURRENT_TIME}<br />
                </span>
                <!-- END switch_user_logged_in -->
                <div class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_CAT_DESC}</div>
              </td>
              <td class="gensmall" align="right" valign="bottom">
                <!-- BEGIN switch_user_logged_in -->
                <a class="gensmall" href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><br />
                <a class="gensmall" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a><br />
                <!-- END switch_user_logged_in -->
                <a class="gensmall" href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a>
              </td>
          </tr>
        </table>
        <!-- BEGIN catrow --><!-- BEGIN tablehead -->
        <table class="forumline" width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
                  <!-- TITRE CATEGORIE -->
                  <th colspan="2" nowrap="nowrap" width="100%" class="secondarytitle">{catrow.tablehead.L_FORUM}</th>
          </tr>
          <!-- END tablehead -->
          <!-- BEGIN cathead -->
          <tr>
              <!-- BEGIN inc -->
              <td width="46"><img src="{SPACER}" height="0" width="46" /></td>
              <!-- END inc -->
              <td class="{catrow.cathead.CLASS_CAT}" colspan="{catrow.cathead.INC_SPAN}" width="100%">
                <h{catrow.cathead.LEVEL} class="hierarchy">
                    <span class="cattitle">
                      <a class="cattitle" title="{catrow.cathead.CAT_DESC}" href="{catrow.cathead.U_VIEWCAT}">{catrow.cathead.CAT_TITLE}</a>
                                          </span>
                </h{catrow.cathead.LEVEL}>
              </td>
              <td class="{catrow.cathead.CLASS_ROWPIC}" align="right">&nbsp;</td>
          </tr>
          <!-- END cathead -->
          <!-- BEGIN forumrow -->
          <tr>
              <!-- BEGIN inc -->
              <td width="46"><img src="{SPACER}" height="0" width="46" alt="." /></td>
              <!-- END inc -->
              <td class="row1 over" colspan="3" valign="top" width="80%" height="50">
                <h{catrow.forumrow.LEVEL} class="hierarchy">
                    <span class="forumlink">
                      <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a>
                    </span>
                                  <div class="bordsou"></div>
                                  </h{catrow.forumrow.LEVEL}>
                                  <div class="last_mess">{catrow.forumrow.POSTS} mess - {catrow.forumrow.TOPICS} topics ; <span class="gensmall" id="last">{catrow.forumrow.LAST_POST}</span></div>
        <script type="text/javascript">
          jQuery('#last').html(jQuery('#last').html().replace(/<br>/g,'<span style="display: inline-block; padding: 0 2px;">-</span>')).removeAttr('id');
          </script>     
                          <div class="genmed">{catrow.forumrow.FORUM_DESC}</div>
                  </td>
                  <td valign="top" width="20%">
                    <div class="imgsou"><img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></div>
                                  <div class="listsou"><span id="subforums">  {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</span></div>
                <script type="text/javascript">
                  jQuery('#subforums').html(jQuery('#subforums').html().replace(/, /g,' <br />')).removeAttr('id');
                </script>
                  </td>
          </tr>
          <!-- END forumrow -->
          <!-- BEGIN catfoot -->
          <tr>
              <!-- BEGIN inc -->
              <td class="{catrow.catfoot.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
              <!-- END inc -->
              <td class="spaceRow" colspan="{catrow.catfoot.INC_SPAN}" height="1"><img src="{SPACER}" alt="" height="1" width="1" /></td>
          </tr>
          <!-- END catfoot -->
          <!-- BEGIN tablefoot -->
        </table><img src="{SPACER}" alt="" height="5" width="1" /><!-- END tablefoot --><!-- END catrow -->
MlleAlys

MlleAlys
Membre actif

Messages : 5793
Inscrit(e) le : 12/09/2012

MlleAlys a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Centrer la cellule Titre de Catégorie

Message par N3m0 Jeu 20 Nov 2014 - 22:01

J'ai déjà tenté de modifier les colspan mais ça ne change rien =(
avatar

N3m0
*

Féminin
Messages : 43
Inscrit(e) le : 23/06/2014

http://eterniacity.forumactif.org/
N3m0 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Centrer la cellule Titre de Catégorie

Message par MlleAlys Ven 21 Nov 2014 - 12:44

pardon j'en avais oublié un ><" :
Code:
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
    <tr>
        <td valign="bottom">
            <!-- BEGIN switch_user_logged_in --> <span class="gensmall">{LAST_VISIT_DATE}<br />
                {CURRENT_TIME}<br />
                </span>

            <!-- END switch_user_logged_in -->
            <div class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_CAT_DESC}</div>
        </td>
        <td class="gensmall" align="right" valign="bottom">
            <!-- BEGIN switch_user_logged_in --> <a class="gensmall" href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a>
            <br /> <a class="gensmall" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
            <br />
            <!-- END switch_user_logged_in --> <a class="gensmall" href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a>

        </td>
    </tr>
</table>
<!-- BEGIN catrow -->



<!-- BEGIN tablehead -->
<table class="forumline" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <!-- TITRE CATEGORIE -->
        <th colspan="2" nowrap="nowrap" width="100%" class="secondarytitle">{catrow.tablehead.L_FORUM}</th>
    </tr>
    <!-- END tablehead -->
    <!-- BEGIN cathead -->
    <tr>
        <td class="{catrow.cathead.CLASS_CAT}" colspan="{catrow.cathead.INC_SPAN}" width="100%">
            <h{catrow.cathead.LEVEL} class="hierarchy"> <span class="cattitle">
                      <a class="cattitle" title="{catrow.cathead.CAT_DESC}" href="{catrow.cathead.U_VIEWCAT}">{catrow.cathead.CAT_TITLE}</a>
                                          </span>

            </h{catrow.cathead.LEVEL}>
        </td>
        <td class="{catrow.cathead.CLASS_ROWPIC}" align="right">&nbsp;</td>
    </tr>
    <!-- END cathead -->
    <!-- BEGIN forumrow -->
    <tr>
        <td class="row1 over" calign="top" width="80%" height="50">
            <h{catrow.forumrow.LEVEL} class="hierarchy"> <span class="forumlink">
                      <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a>
                    </span>

                <div class="bordsou"></div>
            </h{catrow.forumrow.LEVEL}>
            <div class="last_mess">{catrow.forumrow.POSTS} mess - {catrow.forumrow.TOPICS} topics ; <span class="gensmall" id="last">{catrow.forumrow.LAST_POST}</span>
            </div>
            <script type="text/javascript">
                jQuery('#last').html(jQuery('#last').html().replace(/<br>/g, '<span style="display: inline-block; padding: 0 2px;">-</span>')).removeAttr('id');
            </script>
            <div class="genmed">{catrow.forumrow.FORUM_DESC}</div>
        </td>
        <td valign="top" width="20%">
            <div class="imgsou">
                <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
            </div>
            <div class="listsou"><span id="subforums">  {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</span>
            </div>
            <script type="text/javascript">
                jQuery('#subforums').html(jQuery('#subforums').html().replace(/, /g, ' <br />')).removeAttr('id');
            </script>
        </td>
    </tr>
    <!-- END forumrow -->
    <!-- BEGIN catfoot -->
    <tr>
        <!-- BEGIN inc -->
        <td class="{catrow.catfoot.inc.INC_CLASS}" width="46">
            <img src="{SPACER}" height="0" width="46" />
        </td>
        <!-- END inc -->
        <td class="spaceRow" colspan="{catrow.catfoot.INC_SPAN}" height="1">
            <img src="{SPACER}" alt="" height="1" width="1" />
        </td>
    </tr>
    <!-- END catfoot -->
    <!-- BEGIN tablefoot -->
</table>
<img src="{SPACER}" alt="" height="5" width="1" />
<!-- END tablefoot -->
<!-- END catrow -->
MlleAlys

MlleAlys
Membre actif

Messages : 5793
Inscrit(e) le : 12/09/2012

MlleAlys a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Centrer la cellule Titre de Catégorie

Message par N3m0 Ven 21 Nov 2014 - 12:49

Ca marche nickel ! Merci à toi ! =)
avatar

N3m0
*

Féminin
Messages : 43
Inscrit(e) le : 23/06/2014

http://eterniacity.forumactif.org/
N3m0 a été remercié(e) par l'auteur de ce sujet.

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


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