Sawsan Sarandah <[EMAIL PROTECTED]> wrote:
:
: Greetings,
:
: In a checkbox form, how can I change the <font>
: attribute for the "label" text below to Arial
: instead of the default?
The <font> is deprecated. Use stylesheets (CSS)
or use the 'style' attribute.
: $cgi->checkbox(-name=>'checkboxname',-value=>'turned
: on',-label=>"I want
: Arial here");
Option 1:
Wrap a span with an embedded style around
the checkbox.
$cgi->span(
{ style => 'font-family: Arial' },
$cgi->checkbox(
-name => 'checkboxname',
-value => 'turned on',
-label => 'I want Arial here',
),
);
Option 2:
Wrap a span around the checkbox with
a class name.
$cgi->span(
{ class => 'checkbox' },
$cgi->checkbox(
-name => 'checkboxname',
-value => 'turned on',
-label => 'I want Arial here',
),
);
And in the stylesheet (html languages only):
span.checkbox {
font-family: Arial;
display: inline;
}
In the stylesheet (applies to all document
languages):
span[class=checkbox] {
font-family: Arial;
display: inline;
}
Check out http://www.w3.org/TR/REC-CSS2/
for more info on CSS. Note that font-family
should really include more than one font if
you want good control. Fortunately, there
is a whole chapter on fonts at the above
link.
HTH,
Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]