You are here: Re: PHP column widths not setting right. « PHP Programming Language « IT news, forums, messages
Re: PHP column widths not setting right.

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация