This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2005 > formatting form fields





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author formatting form fields
ashkaan57@hotmail.com

2005-11-29, 6:52 pm

Hi,
I am trying to set some style, simeple ones, for some form fields and I
don;t seem to get it working.

in css file:

..FormField {
font-size:x-small; font-family: Verdana, Arial, Helvetica,
sans-serif;
}

in the form:

<td><input class="FormField" maxlength="75" value="" name="phone"></td>

I tried:
<td class "FormField"><input maxlength="75" value="" name="phone"></td>

TIA.

Beauregard T. Shagnasty

2005-11-29, 6:52 pm

ashkaan57@hotmail.com wrote:

> Hi,
> I am trying to set some style, simeple ones, for some form fields and
> I don;t seem to get it working.
>
> in css file:
>
> .FormField {
> font-size:x-small; font-family: Verdana, Arial, Helvetica,
> sans-serif;
> }


Drop that, and use the following:

input { font-size: 100%; font-family: Arial, Helvetica, sans-serif; }

But use the font-family only if you want it different than the family
assigned to the <body> element.

x-small is way smaller than I can read. Set it to 100%, and dump the
Verdana from your site.
http://www.xs4all.nl/~sbpoley/webmatters/verdana.html

If it looks too large in *your* browser, set your own defaults to
something smaller; don't penalize your visitors.

> in the form:
>
> <td><input class="FormField" maxlength="75" value="" name="phone"></td>


<td><input maxlength="75" value="" name="phone"></td>

No other code is necessary.

--
-bts
-Warning: I brake for lawn deer
ashkaan57@hotmail.com

2005-11-29, 10:44 pm

Thank you for the reply.
Can I do the same for dropdowns, listboxes, ...?
Do I have to set:

select {font-size:100%; ...}

Thanks.

Beauregard T. Shagnasty wrote:
> ashkaan57@hotmail.com wrote:
>
>
> Drop that, and use the following:
>
> input { font-size: 100%; font-family: Arial, Helvetica, sans-serif; }
>
> But use the font-family only if you want it different than the family
> assigned to the <body> element.
>
> x-small is way smaller than I can read. Set it to 100%, and dump the
> Verdana from your site.
> http://www.xs4all.nl/~sbpoley/webmatters/verdana.html
>
> If it looks too large in *your* browser, set your own defaults to
> something smaller; don't penalize your visitors.
>
>
> <td><input maxlength="75" value="" name="phone"></td>
>
> No other code is necessary.
>
> --
> -bts
> -Warning: I brake for lawn deer


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews