Here is an example of an html
table
:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="480px" class="societe" ><div style="float:left;font-size:12px;padding-top:2px" ><?php echo $_SESSION[PROJET_REF] ?> - [<?php echo $_SESSION[MANUEL_REF] ?>]</div>
</td>
</tr>
...
</table>
The css
class "societe" looks like this:
.societe{
text-align:left;
padding-left:23px;
font-size:11px;
font-weight:bold;
background: url(../include/images/societe.png) repeat-x;
}
In the column
definition :
<td width="480px" class="societe" >
, the column's width is hard-coded to 480px. To make it dynamic and fit with the column's text width, you can avoid hard-coding. In this case, the text is <?php echo $_SESSION[PROJET_REF] ?> - [<?php echo $_SESSION[MANUEL_REF] ?>
.