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

Hi Monks

I am a total novice and I have a question which is probably very obvious to you, but not, alas, to me.

I would like to change the size of the font I use in my CGI-based table.
I have consulted an html book, but as far as I can see, it is impossible to define the size of the font as one of the attributes of the table.

I have the following code:

print table({-width=>"100%",-border=>"0",-bordercolor=>"#d9dae6",-cell +spacing=>"2",-cellpadding=>"2"},Tr({-bgcolor=>"#97a5f0"},\@rows));
I am guessing that I need to put  font{size=>"2"} somewhere, but where?

Thanks in advance,

Dave

Replies are listed 'Best First'.
Re: changing font size in tables using CGI?
by dda (Friar) on May 11, 2004 at 11:07 UTC
    Hi,

    You missed td() call:

    print table( {-width=>"100%", -border=>"0", -bordercolor=>"#d9dae6", -cellspacing=>"2", -cellpadding=>"2"}, Tr({-bgcolor=>"#97a5f0"}, td({-class => 'sizetwo'}, \@rows) ) );
    You can also print some style information like this:
    print <<EOT; <style type="text/css"> .sizetwo {font-size: large} </style> EOT

    --dda

Re: changing font size in tables using CGI?
by Anonymous Monk on May 11, 2004 at 11:10 UTC
    Thanks, dude: works nicely.

    Dave