in reply to change font size in table rows using cgi

Hi, Good Morning. Here is my suggestion.

print table({-border=>2, -style=>'Font-Size: 25pt;'}, Tr({-align=>CENTER,-valign=>TOP}, [ th({-bgcolor=>'#f9f3c6', -style=>'Font-Size: 35pt;'},['t +ext', 'text','text','text']), td(['text', 'text','text','text']), td(['text', 'text','text','text']), ]) );

Give "-style" in the required row or field. I think it will help you.

Regards,
Velusamy R.

Replies are listed 'Best First'.
Re^2: change font size in table rows using cgi
by dorward (Curate) on Sep 19, 2005 at 14:00 UTC

    Its generally better to avoid inline style (the style attribute) in favour of an external style sheet. This makes things much easier to maintain in the long run.

    Its also a very bad idea to use the pt unit since:

    • Most browsers don't know the DPI of the screen, so can't render pts correctly
    • Internet Explorer makes it very difficult for the user to override point units, which is a pain if you can't read text as small as the author chooses
    • It pays no attention to the user's preferences for font size

    Generally speaking, percentages are the best unit for font sizing.