Ok voici le tableau :bonjour,
pourrais-tu nous donner un exemple du HTML généré (surtout la partie du tableau <td> </td>) ?
autre question : est-ce que le style du texte est <pre>, ou bien une feuille de style indique-t-elle no-wrap ?
Code : Tout sélectionner
<table width="500px" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td width="300" height="28" class="noir12left">Commentaire : <span class="bleu12left"><? print $affichage_commentaire; ?></span></td>
</tr>
</table>
<table width="500px" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td width="300" height="28" class="noir12left">Commentaire : <span class="bleu12left"><? print $affichage_commentaire; ?></span></td>
</tr>
</table>
Tu n'as qu'une seule ligne dans ton tableau que tu mets à 500px. Or tu forces ton <td> à 300px...ce n'est pas très logique.Mise à part cette petite erreur de logique, comment se fait-il que mon tableau s'elargit en fonction de la variable $affichage_commentaire alors qu'il a un fixe en pixel ???Tu n'as qu'une seule ligne dans ton tableau que tu mets à 500px. Or tu forces ton <td> à 300px...ce n'est pas très logique.<table width="500px" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> <td width="300" height="28" class="noir12left">Commentaire : <span class="bleu12left"><? print $affichage_commentaire; ?></span></td> </tr> </table>
<table width="500px" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="noir12left">Commentaire : <span class="bleu12left"><?php print $affichage_commentaire; ?></span></td>
</tr>
</table>
Ce code fonctionne parfaitement. Donnes nous le code complet, le soucis vient d'ailleurs.ça fonctionne ????????????????????????? il n'agrandit pas le tableau ??Ce code fonctionne parfaitement. Donnes nous le code complet, le soucis vient d'ailleurs.<table width="500px" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> <td class="noir12left">Commentaire : <span class="bleu12left"><?php print $affichage_commentaire; ?></span></td> </tr> </table>
<link rel="stylesheet" href="css/style.css" type="text/css"/>
<?php
/* Fichiers necessaires pour pouvoir continuer */
require ("connect_db.php");
/* On recupere la liasse qui a le numero choisi */
$query_liste_infos_doc = "SELECT * FROM ctlqual_docs WHERE ctlqual_docs_ref='11111111111111111112'";
$result_liste_infos_doc = mysql_query($query_liste_infos_doc) or die ('Une erreur est survenue durant l\'execution de la requete : ' . mysql_error());
while ($row_liste_infos_doc = mysql_fetch_row($result_liste_infos_doc))
{
/* On recupere les infos de la liasse */
affichage_commentaire = $row_liste_infos_doc[9];
}
print "
<table width='500px' cellpadding='0' cellspacing='0' border='0' align=center>
<tr>
<td class=noir12left>Commentaire : <span class=bleu12left>$affichage_commentaire</span>
</td>
</tr>
</table>";
?>
Les 2 CSS utilisé :
Code : Tout sélectionner
.noir12left
{
text-align : left;
font-size : 12px;
color : #000000;
font-weight : bold;
text-decoration : none;
font-family : Verdana;
}
.bleu12left
{
text-align : left;
font-size : 12px;
color : #000FFF;
font-weight : bold;
text-decoration : none;
font-family : Verdana;
}
Sorry, decidement, j'ai du mal !!En fait donnes nous ta page "entière". Du <!DOCTYPE au </html>.
Tu es sous quel navigateur ?
Code : Tout sélectionner
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/style.css" type="text/css"/>
<title><? echo $title; ?></title>
</head>
<body>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="contour">
<!--DWLayoutTable-->
<tr>
<td height="80" colspan="2">
<?php
include ("haut.php");
?>
</td>
</tr>
<tr>
<td width="150" height="333" valign="top" class="right">
<table cellpadding="0" cellspacing="0">
<tr>
<td height="25" width="152" class="noir12center">
<center>CPAM : <? print $caisseAgentCarte; ?></center>
</td>
</tr>
<tr>
<td height="300" width="152">
<center>
<? print $menu; ?>
</center>
</td>
</tr>
<tr>
<td height="25" width="152">
<center>
<form method="post" name="imprimer">
<input type="button" value="IMPRIMER" name="imprimer" class="bouton_imprimer" onClick="javascript:window.print();">
</form>
</center>
</td>
</tr>
</table></td>
<td width="610" valign="top">
<?
if ($page == "commentaire") {include ("page_commentaire.php")};
?>
</td>
</tr>
</table>
</body>
</html>