forms, text-fields & fonts...

Discussion in 'HTML' started by Food Groupy, Jun 7, 2004.

  1. Food Groupy

    Food Groupy Guest

    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
     
    Food Groupy, Jun 7, 2004
    #1
    1. Advertising

  2. Food Groupy

    Adrienne Guest

    Gazing into my crystal ball I observed "Food Groupy" <>
    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
     
    Adrienne, Jun 7, 2004
    #2
    1. Advertising

  3. "Food Groupy" <> 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
     
    Jukka K. Korpela, Jun 7, 2004
    #3
  4. Jukka K. Korpela <> 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
     
    David Håsäther, Jun 7, 2004
    #4
  5. "David Håsäther" <> 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
     
    Jukka K. Korpela, Jun 7, 2004
    #5
  6. Jukka K. Korpela <> wrote:

    > "David Håsäther" <> 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
     
    David Håsäther, Jun 7, 2004
    #6
  7. 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
     
    Toby A Inkster, Jun 8, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Desmond

    change fonts in input fields

    Desmond, Mar 12, 2007, in forum: HTML
    Replies:
    1
    Views:
    465
    Jukka K. Korpela
    Mar 12, 2007
  2. Desmond

    change fonts in input fields

    Desmond, Mar 12, 2007, in forum: HTML
    Replies:
    1
    Views:
    302
    =?iso-8859-1?Q?Kim_Andr=E9_Aker=F8?=
    Mar 12, 2007
  3. call_me_anything
    Replies:
    4
    Views:
    469
    Pete Becker
    Sep 30, 2007
  4. Eric
    Replies:
    2
    Views:
    559
  5. sam
    Replies:
    0
    Views:
    416
Loading...

Share This Page