PHP column widths not setting right.

PHP column widths not setting right.

am 19.09.2007 23:06:40 von mattcushing

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@








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)) {
?>






}
?>
Ticket
Assigned To
Subject
Message

Re: PHP column widths not setting right.

am 19.09.2007 23:46:23 von noor.rahman

On Sep 19, 5:06 pm, "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@
>
>


>
>
>
>
>
>
> > 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)) {
> ?>
>
>
>
>
>
>
> >
> ?>
>
Ticket
>
Assigned To
>
Subject
>
Message
>


Why don't your widths add up to 100%?

Re: PHP column widths not setting right.

am 21.09.2007 03:00:42 von Jerry Stuckle

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@
>
>


>
>
>
>
>
>
> > 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)) {
> ?>
>
>
>
>
>
>
> > }
> ?>
>
Ticket
>
Assigned To
>
Subject
>
Message
>

>

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
==================

Re: PHP column widths not setting right.

am 21.09.2007 13:04:25 von Lars Eighner

In our last episode,
<1190236000.599518.310010@r29g2000hsg.googlegroups.com>, the lovely and
talented M@ broadcast on comp.lang.php:

> 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?

This is an HTML/CSS problem, not php. I suggest you make a sample html
document and stylesheet with static data typical of your values. Then you
can experiment with the markup and styling without the complication of the
php. WIDTH as an attribute of TD is deprecated and in particular,
percentages within TABLE have be treated differently by different browsers
in the past (and perhaps still are). Just about all of this is invalid in
XHTML 1.1, so much will depend on the doctype you are declaring and your
stylesheet.

--
Lars Eighner
Countdown: 487 days to go.
What do you do when you're debranded?