|
Posted by Jerry Stuckle on 09/21/07 01:00
M@ wrote:
> Can anyone tell me why I can't set the column widths? The message
> field is huge, so the rest of the columns are fairly cramped and word
> wrapped. I'd really like to be able to set my columns so that the
> last column takes up less, and wraps more.
>
> Any ideas?
>
> thanks,
> M@
>
> <table border="1" cellspacing="3" cellpadding="4" bgcolor="blue">
> <tr bgcolor="white">
> <td width="10%">Ticket
> </td>
> <td width="30%">Assigned To
> </td>
> <td width="20%">Subject
> </td>
> <td width="50%">Message
> </td>
> </tr>
> <?php
> include 'config.php';
> include 'opendb.php';
>
> $query = "SELECT t.ticket_id, t.subject, t.message, s.staff_name
> FROM hdp_tickets t, hdp_staff s
> where s.staff_id = t.assigned_to";
> $result = mysql_query($query);
>
> while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
> ?>
> <tr bgcolor="white">
> <td class="tableTD" width="10%"><?php echo $row['ticket_id']?> </td>
> <td class="tableTD" width="30%"><?php echo $row['staff_name']?></td>
> <td class="tableTD" width="20%"><?php echo $row['subject']?></td>
> <td class="tableTD1" width="50%"><?php echo $row['message']?></td>
> </tr>
> <?php
> }
> ?>
> </table>
>
This isn't a PHP problem - it's an HTML one. PHP doesn't control column
widths - HTML does. All you're doing is writing HTML code. Try alt.html.
And look at the sums of your widths...
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|