Aller au contenu

une cellule qui refuse de rétrécir...


molière

Sujets conseillés

Bonjour !

J'ai un souci avec un script de forum phpbb. Mais mon souci n'est pas du php, mais une histoire de cellule qui ne veut pas rétrécir.

J'ai mis une image ici :

capt.gif.

Les cellules noires ne devraient faire que 20px de haut, hors elles en font au moins 80 :

<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center" >
 <tr>
<td align="left" valign="bottom"><span class="gensmall">
<!-- BEGIN switch_user_logged_in -->
<br />
<!-- END switch_user_logged_in -->
<br /></span><span class="nav"></span></td>
<td align="right" valign="bottom" class="gensmall">
 <!-- BEGIN switch_user_logged_in -->
 <br /><br />
 <!-- END switch_user_logged_in -->
 <a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a></td>
 </tr>
</table>

<table width="100%" [color="red"]height="450"[/color] cellpadding="2" cellspacing="1" border="0" class="forumline" style="background-image: url(templates/subSilver/images/fond orange.png); background-repeat: no-repeat">
 <tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">  </th>


<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
 </tr>
 <!-- BEGIN catrow -->
 <tr>
<td class="catLeft" colspan="2" height="28"></td>
 </tr>
 <!-- BEGIN forumrow -->
 <tr>
<td class="row1" align="center" valign="middle" height="20"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
<td class="row1" width="350" height="20"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="maintitle">{catrow.forumrow.FORUM_NAME}</a><br />
  </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
  </span><span class="gensmall"></span></td>


<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
 </tr>
 <!-- END forumrow -->
 <!-- END catrow -->
</table>

<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
 <tr>
 <td align="left">
 <!-- BEGIN switch_user_logged_in -->
  <span class="gensmall"></span>
 <!-- END switch_user_logged_in -->
 </td>
<td align="right"><span class="gensmall"></span></td>
 </tr>
</table>



<!-- BEGIN switch_user_logged_out -->
<form method="post" action="{S_LOGIN_ACTION}">
 <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
  <td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
</tr>
<tr>
  <td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}:
 <input class="post" type="text" name="username" size="10" />
    {L_PASSWORD}:
 <input class="post" type="password" name="password" size="10" maxlength="32" />
 <!-- BEGIN switch_allow_autologin -->
      {L_AUTO_LOGIN}
 <input class="text" type="checkbox" name="autologin" />
 <!-- END switch_allow_autologin -->
    
 <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
 </span> </td>
</tr>
 </table>
</form>
<!-- END switch_user_logged_out -->

<br clear="all" />

<table cellspacing="3" border="0" align="center" cellpadding="0">
 <tr>
<td width="20" align="center"><img src="templates/subSilver/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td>
<td><span class="gensmall">{L_NEW_POSTS}</span></td>
<td>  </td>
<td width="20" align="center"><img src="templates/subSilver/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td>
<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
<td>  </td>
<td width="20" align="center"></td>
<td><span class="gensmall"></span></td>
 </tr>
</table>

Edit : j'ai avancé... mais pour moi c'est encore plus compliqué : si j'enlève la valeur de height du tableau concerné, à savoir 450, le tableau diminue, et les cellules aussi ! Mais j'ai pourtant besoin que mon tableau fasse cette hauteur pour y mettre mon image en fond ! :blink:

Modifié par molière
Lien vers le commentaire
Partager sur d’autres sites

Le souci, c'est que les cellules, prendront toutes la place disponible dans un tableau !

Si la taille du tableau est définie, elles s'élargiront pour prendre toute la place disponible.

Les solutions :

Crée une nouvelle cellule vide en bas de tableau, sans lui donner de hauteur. Si mes souvenir de design tabulaire sont bons, celle-ci devrait prendre la hauteur 'restante'.

Si ça ne marche pas, insère ton tableau dans un autre tableau qui lui, aura la hauteur de 450px, et l'image en fond.

Lien vers le commentaire
Partager sur d’autres sites

Captain, je te baise les pieds mille fois !!!!!!!!!!!!

Je sais, c'est un peu exagéré, mais c'est à la hauteur de ma joie !!!

La cellule vide en bas du tableau a suffi à dompter la bête.

Merci encore à toi, je suis contente d'avoir appris ça.

M.

Lien vers le commentaire
Partager sur d’autres sites

Veuillez vous connecter pour commenter

Vous pourrez laisser un commentaire après vous êtes connecté.



Connectez-vous maintenant
×
×
  • Créer...