Largeur colonne "Dernier message" + Phrase "...messages dans... sujets"

2 participants

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

Résolu Largeur colonne "Dernier message" + Phrase "...messages dans... sujets"

Message par AlexyaSorya Ven 29 Oct 2010 - 11:55

Bonjour !

Je suis en train de faire un forum RPG, j'ai modifié mon CSS et mes templates pour avoir un beau design. Seulement, petit problème, j'ai supprimé les colonnes "messages" et "sujets" pour insérer une phrase "... messages dans ... sujets" dans la dernière colonne à droite, celle des derniers messages. Jusque là, tout fonctionne, je suis contente mais la phrase apparait ainsi : "21 messages dans1 sujets" (en gros, "messages dans" est plus grand que le reste, et "dans" et "1" sont collés. Ca me dérange assez ^^.

Ensuite, j'aimerais savoir comment faire pour agrandir la largeur de la colonne "dernier message" car pour des raisons esthétiques, j'ai supprimé la phrase "derniers messages" du coup, la colonne est toute petite.

Voici un aperçu de mes deux problèmes :
Largeur colonne "Dernier message" + Phrase "...messages dans... sujets" Wybd_capture

Et mon template index_box :
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}

         {CURRENT_TIME}

         </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>

         <a class="gensmall" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>

         <!-- 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="1" cellpadding="0">
   <tr>
      <th colspan="{catrow.tablehead.INC_SPAN}" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th></div></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="3" align="right"> </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="{catrow.forumrow.INC_CLASS}" align="center" valign="middle">
         <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
      </td>
      <td class="row1 over" colspan="{catrow.forumrow.INC_SPAN}" valign="top" width="100%" 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>
         </h{catrow.forumrow.LEVEL}>
         <span class="genmed">{catrow.forumrow.FORUM_DESC}</span>
         <span class="gensmall">
            <!-- BEGIN switch_moderators_links -->
            {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
            <!-- END switch_moderators_links -->
            {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
         </span>
      </td>
<!-- BEGIN forum_link_no -->
   
      <td class="row3 over" align="center" valign="middle" height="50">
        <span class="gensmall">{catrow.forumrow.POSTS}</span> messages dans
<span class="gensmall">{catrow.forumrow.TOPICS} sujets.</span>
  <br/>
<br/>
        <span class="gensmall">{catrow.forumrow.LAST_POST}</span>
      </td>
      <!-- END forum_link_no -->
      <!-- BEGIN forum_link -->
      <td class="row3" colspan="3" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.forum_link.HIT_COUNT}</span></td>
      <!-- END forum_link -->
   </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 -->

Merci d'avance à la personne qui m'aidera. Smile


Dernière édition par AlexyaSorya le Sam 30 Oct 2010 - 13:31, édité 1 fois
AlexyaSorya

AlexyaSorya
Nouveau membre

Messages : 4
Inscrit(e) le : 28/10/2010

http://miami-youth.forumactif.org/
AlexyaSorya a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Largeur colonne "Dernier message" + Phrase "...messages dans... sujets"

Message par Lixyr Ven 29 Oct 2010 - 13:11

Alors déjà c'est normal si une phrase apparait en gros et l'autre en petit :

<td class="row3 over" align="center" valign="middle" height="50">
<span class="gensmall">{catrow.forumrow.POSTS}</span> messages dans
<span class="gensmall">{catrow.forumrow.TOPICS} sujets.</span>


Votre : "message dans" est hors du span, puisqu'après le </span>
alors que votre "sujets." est dans le span.
A savoir qu'une phrase qui se retrouve dans les <span class="gensmall"> ICI </span> se retrouvent écrite plus petite.

A vous de placer ça comme vous voulez, si vous voulez que ce soit écrit en petit vous mettre ça comme ça :
Code:

<td class="row3 over" align="center" valign="middle" height="50">
        <span class="gensmall">{catrow.forumrow.POSTS}messages dans</span>
<span class="gensmall">{catrow.forumrow.TOPICS} sujets.</span>

Si vous voulez que ce soit écrit en grand :
Code:

<td class="row3 over" align="center" valign="middle" height="50">
        <span class="gensmall">{catrow.forumrow.POSTS}</span> messages dans
<span class="gensmall">{catrow.forumrow.TOPICS} </span>sujets.



Ensuite pour agrandir les valeurs, comme votre première colonn est mesurée en pourcentage, essayez de changer ça :

<td class="row1 over" colspan="{catrow.forumrow.INC_SPAN}" valign="top" width="100%" height="50">

mettez 80 par exemple.

Puisque vos colonnes de dernier message n'a pas de largeur spécifiue (width), cette colonne est spécifiée comme prennant 100% de sa place, elle prend donc toute la place qu'elle peut, la colonne de dernier message est compressée au maximum.
Réduisez la valeur, ça devrait marcher.
Auquel cas, rajoutez un
width="20%"
dans la cellule derniers messages :

<td class="row3 over" align="center" valign="middle" height="50" width="20%">
<span class="gensmall">{catrow.forumrow.POSTS}</span> messages dans
<span class="gensmall">{catrow.forumrow.TOPICS} sujets.</span>
<br/>
<br/>
<span class="gensmall">{catrow.forumrow.LAST_POST}</span>
</td>

tout en laissant la valeur à "80" dans la cellule précédente.
Lixyr

Lixyr
Aidactive
Aidactive

Féminin
Messages : 7387
Inscrit(e) le : 22/07/2010

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

Résolu Re: Largeur colonne "Dernier message" + Phrase "...messages dans... sujets"

Message par AlexyaSorya Ven 29 Oct 2010 - 21:18

Bonsoir ! Merci beaucoup de vous être intéressé à ce problème.

Pour la phrase, c'est règlé, merci !

Par contre, en suivant vos instructions à la lettre en ce qui concerne la largeur de mes colonnes, voici ce que cela donne :
Largeur colonne "Dernier message" + Phrase "...messages dans... sujets" Os7n_capt-twitter

Le template index_box modifié suite à vos suggestions :

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="1" cellpadding="0">
   <tr>
      <th colspan="{catrow.tablehead.INC_SPAN}" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th></div></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="3" align="right"> </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="{catrow.forumrow.INC_CLASS}" align="center" valign="middle">
         <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
      </td>
      [color=darkblue]<td class="row1 over" colspan="{catrow.forumrow.INC_SPAN}" 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><br />
            </span>
         </h{catrow.forumrow.LEVEL}>
         <span class="genmed">{catrow.forumrow.FORUM_DESC}</span>
         <span class="gensmall">
            <!-- BEGIN switch_moderators_links -->
            {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
            <!-- END switch_moderators_links -->
            {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
         </span>
      </td>
<!-- BEGIN forum_link_no -->
   
      <td class="row3 over" align="center" valign="middle" height="50" width="20%">
        <span class="gensmall">{catrow.forumrow.POSTS} messages dans</span>
<span class="gensmall">{catrow.forumrow.TOPICS} sujets.</span>
  <br/>
<br/>
        <span class="gensmall">{catrow.forumrow.LAST_POST}</span>
      </td>
      <!-- END forum_link_no -->
      <!-- BEGIN forum_link -->
      <td class="row3" colspan="3" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.forum_link.HIT_COUNT}</span></td>
      <!-- END forum_link -->
   </tr>
   <!-- END forumrow -->[/color]
   <!-- 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 -->
AlexyaSorya

AlexyaSorya
Nouveau membre

Messages : 4
Inscrit(e) le : 28/10/2010

http://miami-youth.forumactif.org/
AlexyaSorya a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Largeur colonne "Dernier message" + Phrase "...messages dans... sujets"

Message par Lixyr Ven 29 Oct 2010 - 21:44

Euh alors pour info sachez que vous ne pouvez mettre de couleurs quand vous exposez un code.
Vous pouvez seulement quand vous citez. ^^


Alors j'ai fait une modification de template, donc je vous rend votre template sans les width dans les cellules, ça ne marche pas.

En fait votre problème c'est que vous avez enlevé la ligne de titre des cellules "dernier message", ce qui fait qu'elle n'a plus de th qui lui correspond alors que la cellule d'à côté qui correspond à la description, en a une.

J'ai donc remis cette ligne, qui est tout de même importante. J'ai cru comprendre que le fait que ce soit marqué "dernier message" à chaque catégorie vous gênait. Il suffisait juste d'enlever la variable, et non pas d'enlever carrément la ligne.
Ça fausse le tableau sinon.

Voici donc le code (le template index_box entier) intact, avec les nouvelles modification, donc la variable qui vous gênait que j'ai enlevée :

Spoiler:

Voici la partie modifiée :

<!-- BEGIN tablehead --><table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<th colspan="{catrow.tablehead.INC_SPAN}" nowrap="nowrap" width="100%" class="secondarytitle"> {catrow.tablehead.L_FORUM} </th>
<th nowrap="nowrap" width="150"><div style="width:150px;">X</div></th>
</tr>
<!-- END tablehead -->

Evidemment ça n'apparait pas comme ça dans le code, là j'ai mis une grosse croix pour vous montrer ce que j'ai enlevé.
C'était ceci (la variable) qui apparaissait :
{L_LASTPOST}

C'était le petit bout à enlever.


J'espère que c'est bon comme ça, sinon c'est pas grave, je recommence. Very Happy

Lixyr

Lixyr
Aidactive
Aidactive

Féminin
Messages : 7387
Inscrit(e) le : 22/07/2010

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

Résolu Re: Largeur colonne "Dernier message" + Phrase "...messages dans... sujets"

Message par AlexyaSorya Ven 29 Oct 2010 - 23:50

Ca marche ! C'était assez bête finalement, mais je n'y connais rien, j'appliquais juste des tutoriels alors... Smile

Merci d'avoir su tout régler, vous êtes génial !

Ah, et pour la couleur dans le code, veuillez m'en excuser, je ne savais plus si c'était permis ou pas ^^
AlexyaSorya

AlexyaSorya
Nouveau membre

Messages : 4
Inscrit(e) le : 28/10/2010

http://miami-youth.forumactif.org/
AlexyaSorya a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Largeur colonne "Dernier message" + Phrase "...messages dans... sujets"

Message par Lixyr Sam 30 Oct 2010 - 0:05

Oh c'est permis mais c'est pas faisable. Ca met le code de la couleur, et non pas la couleur.
C'était juste une indication, pour que vous le sachiez, parce qu'avec votre template codé ainsi, ça faisait des
Code:
 [color=blue]
et
Code:
[/color]
un peu partout dans le tableau. Very Happy


Et bien de rien. N'oubliez pas de mettre en résolu si vous avez fini, et cliquez sur merci. Ça m'en fera un en plus. x )
Lixyr

Lixyr
Aidactive
Aidactive

Féminin
Messages : 7387
Inscrit(e) le : 22/07/2010

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

Résolu Re: Largeur colonne "Dernier message" + Phrase "...messages dans... sujets"

Message par AlexyaSorya Sam 30 Oct 2010 - 13:33

Ah, d'accord Smile

J'ai mis en résolu, et pour le "Merci", je me demandais ce que c'était ^^. C'est fait !
AlexyaSorya

AlexyaSorya
Nouveau membre

Messages : 4
Inscrit(e) le : 28/10/2010

http://miami-youth.forumactif.org/
AlexyaSorya 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