Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > forms, text-fields & fonts...

Reply
Thread Tools

forms, text-fields & fonts...

 
 
Food Groupy
Guest
Posts: n/a
 
      06-07-2004
hello html-ers

when I create a simple form with some single-line text <input> fields, the
"default text" that appears in the empty field is ARIAL. When I create a
multi-line <text area> field, the default text appears as a "courier" type
of monospaced font.

This is odd.

Is there a "fix" for this, or is this an IE6 kind-of-thing...?

thanks,

Franko Dog


 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      06-07-2004
Gazing into my crystal ball I observed "Food Groupy" <(E-Mail Removed)>
writing in news:rKSwc.26244$jl6.17930@edtnps89:

> hello html-ers
>
> when I create a simple form with some single-line text <input> fields,
> the "default text" that appears in the empty field is ARIAL. When I
> create a multi-line <text area> field, the default text appears as a
> "courier" type of monospaced font.
>
> This is odd.
>
> Is there a "fix" for this, or is this an IE6 kind-of-thing...?
>
> thanks,
>
> Franko Dog
>
>
>


<style type="text/css">
textarea, input {font-family: sans-serif}
</style>

Although there is a reason for this behavior. You see, in a textarea,
sometimes it is necessary for the user to know how many characters they
have typed. If the textarea's COLS attribute is set to 10 and the ROWS
attribute is set to 2 the user can see when they are getting close to 20
characters. Because with monospaced fonts making all the letter the same
width, one can tell at a glance how many character have been typed.


--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      06-07-2004
"Food Groupy" <(E-Mail Removed)> wrote:

> when I create a simple form with some single-line text <input>
> fields, the "default text" that appears in the empty field is ARIAL.


Probably not. You'll see the difference if you try
<input value="abcdefg"><br>
<input value="abcdefg" style="font-family:Arial">

IE 6 uses by default some sans-serif font other than Arial. I haven't
identified what its name is. It's similar to Arial, but if you look at
it, you'll see quite a many small differences, including a bit larger
inherent spacing between letters in Arial.

> When I create a multi-line <text area> field, the default text
> appears as a "courier" type of monospaced font.


Hardly. It's probably "Courier New", which is quite different from
"Courier" (and much better, partly because Courier is a bitmap font,
which misbehaves badly when the font size is increased).

> This is odd.


Not really.

> Is there a "fix" for this, or is this an IE6 kind-of-thing...?


For example,

<style type="text/css">
input, textarea, option, button { font-size: 100%; }
input, textarea { font-family: Arial, Helvetica, sans-serif; }
</style>

The first rule there is not dummy. First, it sets text size in form
fields the same as in normal text, opposite to common browser default of
about 90%. Second, it makes the text size there scaleable. Try a page
containing a form without such a rule, and use the browser settings to
set text size to maximum; normal text gets resized (unless you did
something to break that functionality), text in form fields does not.

The second rule sets, of course, the font size in all input and textarea
elements the same, namely Arial if available, Helvetica otherwise, or a
browser-defined sans-serif font if neither of those two fonts is
available (which is pretty rare).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
David Håsäther
Guest
Posts: n/a
 
      06-07-2004
Jukka K. Korpela <(E-Mail Removed)> wrote:

> IE 6 uses by default some sans-serif font other than Arial. I
> haven't identified what its name is.


Looks like it's Microsoft Sans Serif.

--
David Håsäther
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      06-07-2004
"David Håsäther" <(E-Mail Removed)> wrote:

>> IE 6 uses by default some sans-serif font other than Arial. I haven't
>> identified what its name is.

>
> Looks like it's Microsoft Sans Serif.


Known as "MS Sans Serif", it seems. Thank you. I vaguely remembered it
was something like that but could not find it in the font menu of IE!
Strange.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
David Håsäther
Guest
Posts: n/a
 
      06-07-2004
Jukka K. Korpela <(E-Mail Removed)> wrote:

> "David Håsäther" <(E-Mail Removed)> wrote:
>
>>> IE 6 uses by default some sans-serif font other than Arial. I
>>> haven't identified what its name is.

>>
>> Looks like it's Microsoft Sans Serif.

>
> Known as "MS Sans Serif", it seems.


Actually, I have both MS Sans Serif and Microsoft Sans Serif installed.
The latter one seems to have more characters.

--
David Håsäther
 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      06-08-2004
Jukka K. Korpela wrote:

> Known as "MS Sans Serif", it seems. Thank you. I vaguely remembered it
> was something like that but could not find it in the font menu of IE!


"MS Sans Serif" is bitmapped. Probably your menu only shows TrueType?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments