Click here to get back home

Adjusting Input field size (height)

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Adjusting Input field size (height) Adam Smith 09-09-2006
Posted by Adam Smith on September 9, 2006, 1:27 am
Please log in for more thread options


Hello,

How does one adjust the input field size (height) in a form, say to
accept 10pt rather than the 12pt txt that apparently is the norm.

Thanks

--Adam--

Posted by RobG on September 9, 2006, 2:21 am
Please log in for more thread options



Adam Smith wrote:
> Hello,
>
> How does one adjust the input field size (height) in a form, say to
> accept 10pt rather than the 12pt txt that apparently is the norm.

This has nothing to do with JavaScript, but anyhow... you control the
size of the font using font-size, either through CSS or the input's
style object. The input will usually be re-sized to suit.

Most people don't like you playing with their font sizes, it is
generally best to leave them alone.


--
Rob


Posted by Jukka K. Korpela on September 9, 2006, 6:09 am
Please log in for more thread options



>> How does one adjust the input field size (height) in a form, say to
>> accept 10pt rather than the 12pt txt that apparently is the norm.
>
> This has nothing to do with JavaScript,

or with HTML, really. Some browsers actually let you affect the font in
input fields using text-level markup like <font> or <big>, but there's
hardly any reason to do so.

So the _correct_ group for the question would not be _any_ of the groups it
was posted to. That's more than common in crossposting. People should really
try and find the right group rather than post their messages around.

Followups set to alt.html only.

> but anyhow... you control the
> size of the font using font-size, either through CSS or the input's
> style object. The input will usually be re-sized to suit.

Indeed. But I think the OP needs to be corrected: 12pt is not the norm, and
there is no norm for the size. Besides, the most _common_ default in
browsers is 10pt, but the characteristics of the default font may prevent
people from seeing this. Anyway, browsers generally use _reduced_ font
size - i.e., smaller than the copy text font size they use by default, or
the overall font size - for form fields, so there _is_ a case for setting
the font size of an input field.

> Most people don't like you playing with their font sizes, it is
> generally best to leave them alone.

Generally yes, but for form fields,
input, textarea { font-size: 100%; }
might be a good idea, if you wish to use form fields for letting users type
their input comfortably, rather than as an expression of the best you can do
in artistic design.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Similar ThreadsPosted
focus on a input field January 11, 2005, 2:18 am
Can an input field have a blank name? September 5, 2005, 8:29 pm
text field besides the input tag May 26, 2008, 1:11 pm
Right align content of field September 27, 2006, 3:43 am
Option Select + input field in one October 3, 2007, 8:18 pm
bad position of autocomplete list of input field May 17, 2005, 2:28 pm
Dynamic width of a text input field in a form November 8, 2005, 6:35 am
Overly tall despite setting height. March 20, 2008, 8:32 am
Size of IE input button November 19, 2004, 6:20 am
size attribute of input element: characters not fixed width? January 30, 2005, 7:26 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap