in reply to Background color for a cgi textarea

Erm, why not try the obvious?

$ perl -MCGI -le 'print CGI::textarea( -name => "foo", -style => "back +ground: #eae8e8" );' <textarea name="foo" style="background: #eae8e8"></textarea>

Replies are listed 'Best First'.
Re: Re: Background color for a cgi textarea
by neniro (Priest) on Mar 26, 2004 at 16:15 UTC
    It is always a good idea to separate style from content using css, so I'd prefer this:
    #!/usr/bin/perl use strict; use warnings; use CGI; my $q = new CGI; print $q->start_html( -title=>'Your page', -style=>{'src'=>'/css/default.css'}, ); # # yada yada yada # print $q->textarea( -name => "bar", -class => "inked" ); print "\n";
    of course you need a separate css-file:
    .inked { background: #E0E0F0; border-width: 1px; border-style: solid; }
      And it's even better to seperate the html completely out of your code, via the use of templates of some sort.