[ale] perl CGI.pm and width=>100% ??

James P. Kinney III jkinney at localnetsolutions.com
Wed Feb 27 14:51:14 EST 2002


Nope. The braces define the formating area, the remaining space inside
the parentheses is the the table data (rows, td, and cell contents).

from perldoc CGI:

          print table({-border=>undef},
                  caption('When Should You Eat Your Vegetables?'),
                  Tr({-align=>CENTER,-valign=>TOP},
                  [
                     th(['Vegetable', 'Breakfast','Lunch','Dinner']),
                     td(['Tomatoes' , 'no', 'yes', 'yes']),
                     td(['Broccoli' , 'no', 'no',  'yes']),
                     td(['Onions'   , 'yes','yes', 'yes'])
                  ]
                  )
               );



On Wed, 2002-02-27 at 11:29, David Corbin wrote:
> David S. Jackson wrote:
> 
> >On Wed, Feb 27, 2002 at 01:21:37PM -0000 Greg Sabino Mullane <greg at turnstep.com> wrote:
> >
> >>
> >>>How do you express table cell widths in percentages while using Perl CGI?  
> >>> ...
> >>>print table({cellpadding=>5}, {width=>"100%"},
> >>>
> >>Perl is smart enough to realize that you just want a percent character 
> >>by looking at things in context. However, the real problem is that you 
> >>need to put all of the attributes together as the first argument to 
> >>the table() function, instead of putting each attribute as a new arg. In 
> >>other words, do this instead of the above:
> >>
> >>print table({cellpadding=>5, width=>"100%"},
> >>
> >
> >That's Got It!!  Thanks again, Greg.  Once again you hit the nail
> >on the head!  :-)
> >
> 
> For what it's worth, I don't think you need the brackes either.
> 
> print table(cellpadding=>5,width=>"100%") works too, I think.
> 
> 
> 
> 
> 
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
> sent to listmaster at ale dot org.
> 
-- 
James P. Kinney III   \Changing the mobile computing world/
President and COO      \          one Linux user         /
Local Net Solutions,LLC \           at a time.          /
770-493-8244             \.___________________________./

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7 



 This is a digitally signed message part




More information about the Ale mailing list