Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have the following piece of script - which works ok but how do I specify cell width?
print table({-border=>1, -width=>600, -bgcolor=>'#FFFFFF', cellpadding=>0, cellspacing=>0}, Tr({-align=>CENTER}, [ th.td(['cell1','cell2','cell3']) ]) );
thanks S

Replies are listed 'Best First'.
RE: cgi.pm - tables
by dlc (Acolyte) on Feb 15, 2000 at 23:50 UTC
    pass -width=>$column_width into your td function.
Re: cgi.pm - tables
by btrott (Parson) on Feb 16, 2000 at 00:09 UTC
    Like this:
    print table({-border=>1, -width=>600, -bgcolor=>'#FFFFFF', cellpadding +=>0, cellspacing=>0}, Tr({-align=>'CENTER'}, [ th.td({-width=>200}, ['cell1','cell2','cell3']) ]) );